Rectangle

Overview

Rectangle is a class in Aspose.PDF FOSS for .NET. Inherits from: Shape.

A rectangle shape in the Drawing namespace (distinct from Aspose.Pdf.Rectangle which is a page rectangle).

This class declares 3 methods for Rectangle objects in .NET programs. Available methods include: CheckBounds, Rectangle. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Bottom, GraphInfo, Height, Left, RoundedCornerRadius, Text, and 1 more.

Properties

NameTypeAccessDescription
LeftdoubleRead/WriteGets or sets the X coordinate of the left edge, in points relative to the graph.
BottomdoubleRead/WriteGets or sets the Y coordinate of the bottom edge, in points relative to the graph.
WidthdoubleRead/WriteGets or sets the width in points.
HeightdoubleRead/WriteGets or sets the height in points.
RoundedCornerRadiusdoubleRead/WriteCorner radius for rounded-rectangle rendering (0 = sharp corners).
GraphInfoAspose.Pdf.GraphInfoRead/WriteGets or sets the drawing settings (line width, stroke and fill colours, dash pattern, opacity) used to paint the shape.
TextAspose.Pdf.Text.TextFragment?Read/WriteOptional text label rendered with the shape.

Methods

SignatureDescription
Rectangle(left: double, bottom: double, width: double, height: double)Creates a rectangle with its lower-left corner at (left, bottom) and the given width and height, in points relative to the graph.
Rectangle(left: float, bottom: float, width: float, height: float)Single-precision overload matching the public API.
CheckBounds(containerWidth: double, containerHeight: double)Whether the rectangle lies entirely within an origin-anchored container.

See Also

 English