Class TextRotation
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Xoay văn bản
Truy cập vào chế độ cài đặt xoay văn bản cho một ô.
Phương thức
Phương thức | Loại dữ liệu trả về | Mô tả ngắn |
getDegrees() | Integer | Lấy góc giữa hướng văn bản chuẩn và hướng văn bản hiện tại. |
isVertical() | Boolean | Trả về true nếu văn bản được xếp chồng theo chiều dọc; trả về false nếu không. |
Tài liệu chi tiết
getDegrees()
Lấy góc giữa hướng văn bản chuẩn và hướng văn bản hiện tại. Đối với văn bản từ trái sang phải, các góc dương sẽ theo chiều kim đồng hồ. Nếu văn bản được đặt để xếp chồng theo chiều dọc, phương thức này sẽ trả về 0
.
Cầu thủ trả bóng
Integer
– Số độ giữa độ xoay văn bản chuẩn và độ xoay văn bản hiện tại.
isVertical()
Trả về true
nếu văn bản được xếp chồng theo chiều dọc; trả về false
nếu không.
Cầu thủ trả bóng
Boolean
– Liệu văn bản có được xếp chồng theo chiều dọc hay không.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eTextRotation\u003c/code\u003e allows you to control the rotation settings of text within a cell.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the angle of rotation using \u003ccode\u003egetDegrees()\u003c/code\u003e and check for vertical stacking using \u003ccode\u003eisVertical()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetDegrees()\u003c/code\u003e returns an integer representing the angle, while \u003ccode\u003eisVertical()\u003c/code\u003e returns a boolean indicating vertical or horizontal orientation.\u003c/p\u003e\n"]]],[],null,["# Class TextRotation\n\nTextRotation\n\nAccess the text rotation settings for a cell. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------|-------------|------------------------------------------------------------------------------------|\n| [getDegrees()](#getDegrees()) | `Integer` | Gets the angle between standard text orientation and the current text orientation. |\n| [isVertical()](#isVertical()) | `Boolean` | Returns `true` if the text is stacked vertically; returns `false` otherwise. |\n\nDetailed documentation\n----------------------\n\n### `get``Degrees()`\n\nGets the angle between standard text orientation and the current text orientation. For\nleft-to-right text, positive angles are in the counterclockwise direction. If the text is set\nto stack vertically, this method returns `0`.\n\n#### Return\n\n\n`Integer` --- The degrees between standard text rotation and the current text rotation.\n\n*** ** * ** ***\n\n### `is``Vertical()`\n\nReturns `true` if the text is stacked vertically; returns `false` otherwise.\n\n#### Return\n\n\n`Boolean` --- Whether or not the text is stacked vertically."]]