Rectangle
ภาพรวม
Rectangle เป็นคลาสใน Aspose.PDF FOSS สําหรับ Java. ทายาทจาก: Shape.
แสดงรูปแบบวาดสี่เหลี่ยม.
หมวดนี้ให้วิธีการ 12 สําหรับทํางานกับวัตถุ Rectangle ในโปรแกรม Java. วิธีการที่ใช้ได้แก่: Rectangle, checkBounds, getBottom, getHeight, getLeft, getRoundedCornerRadius, getWidth, setBottom, setHeight, setLeft, setRoundedCornerRadius, setWidth. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Java ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Java. คุณสมบัติ: bottom, height, left, roundedCornerRadius, width.
คุณสมบัติ
| ชื่อ | ประเภท | Access | คําอธิบาย |
|---|---|---|---|
left | float | อ่าน | รับค่า x-coordinate ของมุมซ้ายล่าง. |
bottom | float | อ่าน | รับค่า y-coordinate ของมุมล่างซ้าย. |
width | float | อ่าน | รับความกว้างของสี่เหลี่ยม. |
height | float | อ่าน | รับความสูงของสี่เหลี่ยมผืนผ้า. |
roundedCornerRadius | float | อ่าน | รับรัศมีของมุมสำหรับสี่เหลี่ยมมุมมน. |
วิธีการ
| Signature | คําอธิบาย |
|---|---|
Rectangle(left: float, bottom: float, width: float, height: float) | สร้างสี่เหลี่ยมใหม่ที่มีตําแหน่งและขนาดที่กําหนดไว้. |
getLeft() → float | รับค่า x-coordinate ของมุมล่างซ้าย. |
setLeft(left: float) | ตั้งค่าพิกัด x ของมุมซ้ายล่าง. |
getBottom() → float | รับค่า y-coordinate ของมุมล่างซ้าย. |
setBottom(bottom: float) | ตั้งค่าพิกัด y ของมุมซ้ายล่าง. |
getWidth() → float | รับความกว้างของสี่เหลี่ยม. |
setWidth(width: float) | ตั้งค่าความกว้างของสี่เหลี่ยม. |
getHeight() → float | รับความสูงของสี่เหลี่ยมผืนผ้า. |
setHeight(height: float) | ตั้งค่าความสูงของสี่เหลี่ยม. |
getRoundedCornerRadius() → float | รับรัศมีของมุมสำหรับสี่เหลี่ยมมุมมน. |
setRoundedCornerRadius(roundedCornerRadius: float) | กำหนดรัศมีของมุมสำหรับสี่เหลี่ยมมุมมน. |
checkBounds(containerWidth: double, containerHeight: double) | {@inheritDoc} / |