Table of Contents

OIL2 Class Standard.DrawingShape


class Standard . DrawingShape {
        array   boundingBox;
        array   fillGradients;
        assoc   fillMatrix;
        int32   fillStyle;
        array   lineColor;
        int32   lineWidth;
        assoc   matrix;
        any     solidFillColor;
        int32   visible;
} inherits from DrawingObject;

DESCRIPTION

A DrawingShape object is a subclass of DrawingObject that deals with lines, polygons and filled areas.

METHODS


Standard.DrawingShape:create

DrawingShape:create(int32 xmin, int32 ymin, int32 xmax, int32 ymax)

Method Description

See initialize. By default, a shape will be drawn with a black, single pixel wide line and no fill. These defaults are altered by methods such as setLineStyle and setFillStyle. A shape is also visible by default; the visibility can be adjusted by setVisibility.


Standard.DrawingShape:initialize

DrawingShape:initialize(int32 xmin, int32 ymin, int32 xmax, int32 ymax)

Method Description

The initialize method sets the bounding box for the shape by specifying the the upper left and lower right corners.

Return Value

Returns zero.


Standard.DrawingShape:setVisibility

DrawingShape:setVisibility(optional int32 flag)

Method Description

Set the visibility of the shape. If the optional Boolean argument is not specified, the shape is marked as visible. Shapes that are not visible are usually used as by DrawingAlias objects. Depending on the capabilities of the rendering engine, this enables only one copy of the shape to be sent and drawn in multiple locations using various colors and transformations.

Return Value

Returns zero.


Standard.DrawingShape:getVisibility

DrawingShape:getVisibility()

Method Description

Returns a Boolean flag indicating the visibility of a shape.


Standard.DrawingShape:setBounds

DrawingShape:setBounds(int32 xmin, int32 ymin, int32 xmax, int32 ymax)

Method Description

The setBounds method alters the bounding box of the shape. The bounding box is described by specifying the the upper left and lower right corners.

Return Value

Returns zero.


Standard.DrawingShape:getBounds

DrawingShape:getBounds()

Method Description

Returns a 4-element array representing the bounding box of the shape.


Standard.DrawingShape:setLineWidth

DrawingShape:setLineWidth(int32 width)

Method Description

Set the width of line. No adjustment is made to the color. Use setLineStyle to set the line color and width in one step.

Return Value

The value 0 will be returned.


Standard.DrawingShape:getLineWidth

DrawingShape:getLineWidth()

Method Description

Returns the width of the drawing line.


Standard.DrawingShape:setLineColor

DrawingShape:setLineColor(int32 red, int32 green, int32 blue, optional int32 alpha)

Method Description

Sets the color of the drawing line without adjusting its width. If alpha is not specified, it defaults to 255. Use setLineStyle to set the line color and width in one step.

Return Value

The value 0 will be returned.


Standard.DrawingShape:setLineStyle

DrawingShape:setLineStyle(int32 width, int32 red, int32 green, int32 blue, optional int32 alpha)

Method Description

If alpha is not specified, it defaults to 255.

Return Value

The value 0 will be returned.


Standard.DrawingShape:getLineColor

DrawingShape:getLineColor()

Method Description

Returns the color of the line as a 4-element array (red, green, blue, alpha). Each element has a value ranging between 0 and 255.


Standard.DrawingShape:getLineStyle

DrawingShape:getLineStyle()

Method Description

Returns a 2-element array. Subscript 0 holds the width of the line; subscript 1 holds a 4-element array specifying the drawing color.


Standard.DrawingShape:getFillStyle

DrawingShape:getFillStyle()

Method Description

Returns an array describing the shape's fill style. Subscript 0 identifies the type of fill to be performed: FILL_STYLE_NONE, FILL_STYLE_SOLID, FILL_STYLE_LINEAR_GRADIENT, FILL_STYLE_RADIAL_GRADIENT. For FILL_STYLE_SOLID, subscript 1 holds a 4 element array that specifies the fill color as an (red, green, blue, alpha) quad.


Standard.DrawingShape:setNoFill

DrawingShape:setNoFill()

Method Description

Return Value

The value 0 will be returned.


Standard.DrawingShape:setSolidFill

DrawingShape:setSolidFill(int32 red, int32 green, int32 blue, int32 alpha)

Method Description

Return Value

The value 0 will be returned.


Standard.DrawingShape:getSolidFillColor

DrawingShape:getSolidFillColor()

Method Description

Returns the fill color of the shape as a 4-element array (red, green, blue, alpha). Each element has a value ranging between 0 and 255.


Standard.DrawingShape:setLinearFill

DrawingShape:setLinearFill(array leftRGBA, array rightRGBA)

Method Description


Standard.DrawingShape:setLinearFillCenter

DrawingShape:setLinearFillCenter(int32 x, int32 y)

Method Description


Standard.DrawingShape:setRadialFill

DrawingShape:setRadialFill(array centerRGBA, array outsideRGBA)

Method Description


Standard.DrawingShape:setRadialFillCenter

DrawingShape:setRadialFillCenter(int32 x, int32 y)

Method Description


Standard.DrawingShape:setBitmapFillJPEG

DrawingShape:setBitmapFillJPEG(string jpegData, optional int32 fillTiled)

Method Description


Standard.DrawingShape:setBitmapFillLossless

DrawingShape:setBitmapFillLossless(int32 x, int32 y, string bitmapData)

Method Description


Standard.DrawingShape:translate

DrawingShape:translate(int32 x, int32 y)

Method Description


Standard.DrawingShape:rotateAndSkew

DrawingShape:rotateAndSkew(int32 skewRotate1, optional int32 skewRotate2)

Method Description


Standard.DrawingShape:rotateDegrees

DrawingShape:rotateDegrees(int32 degrees)

Method Description

Note: perform scale before rotateDegees.


Standard.DrawingShape:scale

DrawingShape:scale(any x_scale, any y_scale)

Method Description


Generated: Tue, 23 Aug 2011 00:47:36 EDT
Support Information