Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
    • Audio
    • Sound
    • File
    • MetaClass
    • Module
    • StorageDevice
    • Task
    • Thread
    • Time
    • Compression
    • Config
    • Script
    • XML
    • Controller
    • BlurFX
    • ColourFX
    • CompositeFX
    • ConvolveFX
    • DisplacementFX
    • FilterEffect
    • FloodFX
    • ImageFX
    • LightingFX
    • MergeFX
    • MorphologyFX
    • OffsetFX
    • RemapFX
    • SourceFX
    • TurbulenceFX
    • WaveFunctionFX
    • Scintilla
    • ScintillaSearch
    • Bitmap
    • Clipboard
    • Display
    • Document
    • Font
    • Picture
    • Pointer
    • Surface
    • SVG
    • ClientSocket
    • HTTP
    • NetSocket
    • Proxy
    • Vector
    • VectorClip
    • VectorColour
    • VectorEllipse
    • VectorFilter
    • VectorGradient
    • VectorGroup
    • VectorImage
    • VectorPath
    • VectorPattern
    • VectorPolygon
    • VectorRectangle
    • VectorScene
    • VectorShape
    • VectorSpiral
    • VectorText
    • VectorTransition
    • VectorViewport
    • VectorWave

VectorRectangle Class

Extends the Vector class with support for generating rectangles.

VectorRectangle extends the Vector class with the ability to generate rectangular paths.

Structure

The VectorRectangle class consists of the following fields:

Access
NameTypeComment
  DimensionsINTDimension flags define whether individual dimension fields contain fixed or scaled values.

The following dimension flags are supported:

NameDescription
FIXED_HEIGHTThe Height value is a fixed coordinate.
FIXED_WIDTHThe Width value is a fixed coordinate.
FIXED_XThe X value is a fixed coordinate.
FIXED_YThe Y value is a fixed coordinate.
FIXED_RADIUS_XThe RoundX value is a fixed coordinate.
FIXED_RADIUS_YThe RoundY value is a fixed coordinate.
SCALED_HEIGHTThe Height value is a scaled coordinate.
SCALED_WIDTHThe Width value is a scaled coordinate.
SCALED_XThe X value is a scaled coordinate.
SCALED_YThe Y value is a scaled coordinate.
SCALED_RADIUS_XThe RoundX value is a scaled coordinate.
SCALED_RADIUS_YThe RoundY value is a scaled coordinate.
  HeightDOUBLEThe height of the rectangle. Can be expressed as a fixed or scaled coordinate.

The height of the rectangle is defined here as either a fixed or scaled value. Negative values are permitted (this will flip the rectangle on the vertical axis).

  RoundXDOUBLESpecifies the size of rounded corners on the horizontal axis.

The corners of a rectangle can be rounded by setting the RoundX and RoundY values. Each value is interpreted as a radius along the relevant axis. A value of zero (the default) turns off this feature.

  RoundYDOUBLESpecifies the size of rounded corners on the vertical axis.

The corners of a rectangle can be rounded by setting the RoundX and RoundY values. Each value is interpreted as a radius along the relevant axis. A value of zero (the default) turns off this feature.

  RoundingDOUBLE []Precisely controls rounded corner positioning.

Set the Rounding field if all four corners of the rectangle need to be precisely controlled. Four X,Y sizing pairs must be provided in sequence, with the first describing the top-left corner and proceeding in clockwise fashion. Each pair of values is equivalent to a RoundX,RoundY definition for that corner only.

By default, values will be treated as fixed pixel units. They can be changed to scaled values by defining the DMF::SCALED_RADIUS_X and/or DMF::SCALED_RADIUS_Y flags in the Dimensions field. The scale is calculated against the rectangle's diagonal.

  WidthDOUBLEThe width of the rectangle. Can be expressed as a fixed or scaled coordinate.

The width of the rectangle is defined here as either a fixed or scaled value. Negative values are permitted (this will flip the rectangle on the horizontal axis).

  XDOUBLEThe left-side of the rectangle. Can be expressed as a fixed or scaled coordinate.
  XOffsetDOUBLEThe right-side of the rectangle, expressed as a fixed or scaled offset value.
  YDOUBLEThe top of the rectangle. Can be expressed as a fixed or scaled coordinate.
  YOffsetDOUBLEThe bottom of the rectangle, expressed as a fixed or scaled offset value.
VectorRectangle class documentation © Paul Manias © 2010-2025