C# Class LitDev.LDShapes

Mostra file Open project: litdev1/LitDev

Public Properties

Property Type Description
brushes List

Public Methods

Method Description
AddAnimatedGif ( Primitive imageName, Primitive repeat ) : Primitive

Creates an animated gif shape. Do not add a very large number of these or performance may be degraded.

AddAnimatedImage ( Primitive imageName, Primitive repeat, Primitive countX, Primitive countY ) : Primitive

Creates an animation from a single image with multiple images on one layer. Do not add a very large number of these or performance may be degraded.

AddPolygon ( Primitive points ) : Primitive

Creates a polygon shape.

AddRegularPolygon ( Primitive numPoint, Primitive radius ) : Primitive

Creates a regular polygon shape.

AddStar ( Primitive numPoint, Primitive innerRadius, Primitive outerRadius ) : Primitive

Creates a star shape. Fun effects can be created with negative distances.

AnimateOpacity ( Primitive shapeName, Primitive interval, Primitive count ) : void

Set a shape to animate opacity, flash (fade out and in).

AnimateRotation ( Primitive shapeName, Primitive interval, Primitive count ) : void

Set a shape to animate rotation (rotate continuously).

AnimateZoom ( Primitive shapeName, Primitive interval, Primitive count, Primitive scaleX, Primitive scaleY ) : void

Set a shape to animate zooming (in and out).

AnimationCount ( Primitive shapeName ) : Primitive

Get the number of images in an animated image.

AnimationPause ( Primitive shapeName ) : void

Pause an animated image. Paused images can still be updated using AnimationSet

AnimationResume ( Primitive shapeName ) : void

Resume a previously paused animated image.

AnimationSet ( Primitive shapeName, Primitive image ) : void

Reset animated image to a selected image.

BrushColour ( Primitive shapeName, Primitive colour ) : void

Set shape Brush colour.

BrushEllipse ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void

Draw an ellipse filled with a gradient of colours.

BrushGradient ( Primitive colours, Primitive orientation ) : Primitive

Create a linear or radial gradient brush.

BrushImage ( Primitive imageName ) : Primitive

Create an image brush. These brushes should work anywhere that BrushGradient can be used.

BrushPolygon ( Primitive brush, Primitive points ) : void

Draw a polygon filled with a gradient of colours.

BrushRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void

Draw a rectangle filled with a gradient of colours.

BrushRoundedRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height, Primitive radius ) : void

Draw a rounded rectangle filled with a gradient of colours.

BrushShape ( Primitive shapeName, Primitive brush ) : void

Set a shape Brush style as a gradient of colours.

BrushText ( Primitive text, Primitive background, Primitive foreground ) : Primitive

Create a text brush. These brushes should work anywhere that BrushGradient can be used.

Centre ( Primitive shapeName, Primitive x, Primitive y ) : void

Centre the shape on a point, also works for zoomed shapes.

FastMove ( Primitive shapeName, Primitive x, Primitive y ) : void

Moves the shape with the specified name to a new position. This method is maximally optimsed for speed.

Font ( Primitive shapeName, Primitive family, Primitive size, Primitive bold, Primitive italic ) : void

Set shape Font.

GetAllShapes ( ) : Primitive

Get an array of all currently created shapes.

GetAllShapesAt ( Primitive x, Primitive y ) : Primitive

Get an array of all of the shapes (if any) at the specified coordinates. The coordinates could be the mouse coordinates for example.

GetColour ( Primitive shapeName ) : Primitive

Get shape Brush and Pen colours.

GetLeft ( Primitive shapeName ) : Primitive

Get the left position of a shape (works for triangles, polygons and lines). Also works for shapes while animating.

GetOpacity ( Primitive shapeName ) : Primitive

Gets the opacity of a shape.

GetProperties ( Primitive shapeName ) : Primitive

Get a list of shape properties. These are .Net UIElement properties.

GetProperty ( Primitive shapeName, Primitive property ) : Primitive

Get a shape property. This is a .Net UIElement property.

GetTop ( Primitive shapeName ) : Primitive

Get the top position of a shape (works for triangles, polygons and lines). Also works for shapes while animating.

Height ( Primitive shapeName ) : Primitive

Get the shape's visible (including zoom) height.

Move ( Primitive shapeName, Primitive x, Primitive y ) : void

Moves a triangle or polygon top-left position. This method also works for lines (Shapes.AddLine).

MoveLine ( Primitive shapeName, Primitive x1, Primitive y1, Primitive x2, Primitive y2 ) : void

Moves a line shape.

MovePolygon ( Primitive shapeName, Primitive points ) : void

Moves a polygon shape.

MoveTriangle ( Primitive shapeName, Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive x3, Primitive y3 ) : void

Moves a triangle shape.

Overlap ( Primitive shape1, Primitive shape2 ) : Primitive

Checks for shape overlap (collision detection for any ellipse or rectangle shape types). The first shape should be unZoomed and unRotated.

OverlapBox ( Primitive shape1, Primitive shape2 ) : Primitive

Checks for shape overlap of bounding boxes (collision detection).

OverlapCircle ( Primitive shape1, Primitive shape2 ) : Primitive

Checks for shape overlap of bounding circles (collision detection).

PenColour ( Primitive shapeName, Primitive colour ) : void

Set shape Pen colour.

PenStyle ( Primitive shapeName, Primitive dash, Primitive space ) : void

Set shape Pen style (dash, dot etc).

PenWidth ( Primitive shapeName, Primitive width ) : void

Set shape Pen width.

RasteriseTurtleLines ( ) : void

Rasterise all turtle trail lines. When the number of turtle trails is large the program may slow due to the number of line shapes (trails) present. This converts the turtle trails from line shapes to background drawings.

ReSize ( Primitive shapeName, Primitive width, Primitive height ) : void

Resize shape width and height (an absolute version of zoom).

RemoveTurtleLines ( ) : void

Remove all turtle trail lines.

ResetTurtle ( ) : void

Reset the Turtle after a GraphicsWindow.Clear().

RotateAbout ( Primitive shapeName, Primitive x, Primitive y, Primitive angle ) : void

Rotate a shape about a point.

SetImage ( Primitive shapeName, Primitive imageName ) : void

Set or change an image in a button or image shape.

SetProperty ( Primitive shapeName, Primitive property, Primitive value ) : void

Set a shape property. This is a .Net UIElement property.

SetShapeEvent ( Primitive shapeName ) : void

Register a shape to record mouse events: MouseDown, MouseUp, MouseEnter, MouseLeave, GotFocus and LostFocus.

SetSize ( Primitive shapeName, Primitive width, Primitive height ) : void

Reset the size of a shape as if it was created with the new size. The position (top left point) is unchanged.

SetTurtleImage ( Primitive imageName, Primitive size ) : void

Set the turtle to an image.

Skew ( Primitive shapeName, Primitive angleX, Primitive angleY ) : void

Skews the shape with the specified name by the specified angles.

Width ( Primitive shapeName ) : Primitive

Get the shape's visible (including zoom) width.

ZIndex ( Primitive shapeName, Primitive z_index ) : void

Set shape z index (layer position negative are background and positive are foreground - default 0).

ZoomAll ( Primitive scaleX, Primitive scaleY ) : void

Zoom all shapes.

Private Methods

Method Description
BackgroundImage ( Primitive imageName ) : void
BrushGradientBackground ( Primitive brush ) : void
BrushGradientEllipse ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void
BrushGradientPolygon ( Primitive brush, Primitive points ) : void
BrushGradientRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void
BrushGradientRoundedRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height, Primitive radius ) : void
BrushGradientShape ( Primitive shapeName, Primitive brush ) : void
Centre_Delegate ( ) : void
DoubleAnimateProperty ( string name, IAnimatable animatable, DependencyProperty property, double end, double timespan ) : void
FastMove_Delegate ( ) : void
Overlap_Delegate ( ) : void
_HitTestFilterGeometry ( DependencyObject obj ) : HitTestFilterBehavior
_HitTestResult ( System.Windows.Media.HitTestResult result ) : HitTestResultBehavior
_HitTestResultGeometry ( System.Windows.Media.HitTestResult result ) : HitTestResultBehavior
_ShapeEventsGotFocus ( Object sender, RoutedEventArgs e ) : void
_ShapeEventsLostFocus ( Object sender, RoutedEventArgs e ) : void
_ShapeEventsMouseDown ( Object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
_ShapeEventsMouseEnter ( Object sender, System.Windows.Input.MouseEventArgs e ) : void
_ShapeEventsMouseLeave ( Object sender, System.Windows.Input.MouseEventArgs e ) : void
_ShapeEventsMouseUp ( Object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
animation_Tick ( object sender, EventArgs e ) : void
getNewBrushName ( ) : string
getPoints ( Primitive points ) : System.Windows.Media.PointCollection
treeViewBrushColour ( System.Windows.Controls.ItemCollection items, SolidColorBrush brush ) : void
treeViewPenColour ( System.Windows.Controls.ItemCollection items, SolidColorBrush brush ) : void
updateGif_Delegate ( ) : void

Method Details

AddAnimatedGif() public static method

Creates an animated gif shape. Do not add a very large number of these or performance may be degraded.
public static AddAnimatedGif ( Primitive imageName, Primitive repeat ) : Primitive
imageName Primitive /// The animated gif file (local or network) to load. ///
repeat Primitive /// Continuously repeat the animation "True" or "False". ///
return Primitive

AddAnimatedImage() public static method

Creates an animation from a single image with multiple images on one layer. Do not add a very large number of these or performance may be degraded.
public static AddAnimatedImage ( Primitive imageName, Primitive repeat, Primitive countX, Primitive countY ) : Primitive
imageName Primitive /// The image file (local or network) to load. /// Can also be an ImageList image. ///
repeat Primitive /// Continuously repeat the animation "True" or "False". ///
countX Primitive /// The number of sub-images in the X direction. ///
countY Primitive /// The number of sub-images in the Y direction. ///
return Primitive

AddPolygon() public static method

Creates a polygon shape.
public static AddPolygon ( Primitive points ) : Primitive
points Primitive /// An array of coordinates for the polygon corners with the form points[i][1] = x, points[i][2] = y. /// /// The number of points must be 3 or more. ///
return Primitive

AddRegularPolygon() public static method

Creates a regular polygon shape.
public static AddRegularPolygon ( Primitive numPoint, Primitive radius ) : Primitive
numPoint Primitive The number of polygon sides.
radius Primitive The centre to corner distance.
return Primitive

AddStar() public static method

Creates a star shape. Fun effects can be created with negative distances.
public static AddStar ( Primitive numPoint, Primitive innerRadius, Primitive outerRadius ) : Primitive
numPoint Primitive The number of star points.
innerRadius Primitive The centre to inner points' distance.
outerRadius Primitive The centre to outer points' distance.
return Primitive

AnimateOpacity() public static method

Set a shape to animate opacity, flash (fade out and in).
public static AnimateOpacity ( Primitive shapeName, Primitive interval, Primitive count ) : void
shapeName Primitive The shape or control to flash.
interval Primitive The interval in ms for a complete flash cycle. /// A value of 0 will stop the flashing.
count Primitive The number of flashes. /// A value of 0 will flash continuously.
return void

AnimateRotation() public static method

Set a shape to animate rotation (rotate continuously).
public static AnimateRotation ( Primitive shapeName, Primitive interval, Primitive count ) : void
shapeName Primitive The shape or control to rotate.
interval Primitive The interval in ms for a complete 360 degree rotation. /// A value of 0 will stop the rotation. /// A value less than 0 will rotate anti-clockwise.
count Primitive The number of rotations. /// A value of 0 will rotate continuously.
return void

AnimateZoom() public static method

Set a shape to animate zooming (in and out).
public static AnimateZoom ( Primitive shapeName, Primitive interval, Primitive count, Primitive scaleX, Primitive scaleY ) : void
shapeName Primitive The shape or control to zoom.
interval Primitive The interval in ms for a complete zoom cycle. /// A value of 0 will stop the zooming.
count Primitive The number of zoom cycles. /// A value of 0 will zoom continuously.
scaleX Primitive The X zoom scale factor.
scaleY Primitive The Y zoom scale factor.
return void

AnimationCount() public static method

Get the number of images in an animated image.
public static AnimationCount ( Primitive shapeName ) : Primitive
shapeName Primitive /// The animated image shape name. ///
return Primitive

AnimationPause() public static method

Pause an animated image. Paused images can still be updated using AnimationSet
public static AnimationPause ( Primitive shapeName ) : void
shapeName Primitive /// The animated image shape name. ///
return void

AnimationResume() public static method

Resume a previously paused animated image.
public static AnimationResume ( Primitive shapeName ) : void
shapeName Primitive /// The animated image shape name. ///
return void

AnimationSet() public static method

Reset animated image to a selected image.
public static AnimationSet ( Primitive shapeName, Primitive image ) : void
shapeName Primitive /// The animated image shape name. ///
image Primitive /// The selected animated image number (indexed from 1). ///
return void

BrushColour() public static method

Set shape Brush colour.
public static BrushColour ( Primitive shapeName, Primitive colour ) : void
shapeName Primitive /// The shape or control name. ///
colour Primitive /// The new brush colour. ///
return void

BrushEllipse() public static method

Draw an ellipse filled with a gradient of colours.
public static BrushEllipse ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
x Primitive /// The x co-ordinate of the ellipse. ///
y Primitive /// The y co-ordinate of the ellipse. ///
width Primitive /// The width of the ellipse. ///
height Primitive /// The height of the ellipse. ///
return void

BrushGradient() public static method

Create a linear or radial gradient brush.
public static BrushGradient ( Primitive colours, Primitive orientation ) : Primitive
colours Primitive /// An array of colours to apply to the shape in a gradient. ///
orientation Primitive /// The orientation for the gradient. /// "H" horizontal. /// "V" vertical. /// "DU" diagonally up. /// "DD" diagonally down. /// "R" radial (default if "") ///
return Primitive

BrushImage() public static method

Create an image brush. These brushes should work anywhere that BrushGradient can be used.
public static BrushImage ( Primitive imageName ) : Primitive
imageName Primitive /// The image to load to the brush. /// Value returned from ImageList.LoadImage or local or network image file. ///
return Primitive

BrushPolygon() public static method

Draw a polygon filled with a gradient of colours.
public static BrushPolygon ( Primitive brush, Primitive points ) : void
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
points Primitive /// An array of coordinates for the polygon corners with the form points[i][1] = x, points[i][2] = y. /// /// The number of points must be 3 or more. ///
return void

BrushRectangle() public static method

Draw a rectangle filled with a gradient of colours.
public static BrushRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height ) : void
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
x Primitive /// The x co-ordinate of the rectangle. ///
y Primitive /// The y co-ordinate of the rectangle. ///
width Primitive /// The width of the rectangle. ///
height Primitive /// The height of the rectangle. ///
return void

BrushRoundedRectangle() public static method

Draw a rounded rectangle filled with a gradient of colours.
public static BrushRoundedRectangle ( Primitive brush, Primitive x, Primitive y, Primitive width, Primitive height, Primitive radius ) : void
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
x Primitive /// The x co-ordinate of the rectangle. ///
y Primitive /// The y co-ordinate of the rectangle. ///
width Primitive /// The width of the rectangle. ///
height Primitive /// The height of the rectangle. ///
radius Primitive /// The radius of the rounded corners. ///
return void

BrushShape() public static method

Set a shape Brush style as a gradient of colours.
public static BrushShape ( Primitive shapeName, Primitive brush ) : void
shapeName Primitive /// The shape or control name. ///
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
return void

BrushText() public static method

Create a text brush. These brushes should work anywhere that BrushGradient can be used.
public static BrushText ( Primitive text, Primitive background, Primitive foreground ) : Primitive
text Primitive /// The text to add to the brush. /// The current GraphicsWindow font is used. ///
background Primitive /// The background colour. ///
foreground Primitive /// The foreground (pen) colour. ///
return Primitive

Centre() public static method

Centre the shape on a point, also works for zoomed shapes.
public static Centre ( Primitive shapeName, Primitive x, Primitive y ) : void
shapeName Primitive /// The shape or control name. ///
x Primitive /// The x coordinate of the centre. ///
y Primitive /// The y coordinate of the centre. ///
return void

FastMove() public static method

Moves the shape with the specified name to a new position. This method is maximally optimsed for speed.
public static FastMove ( Primitive shapeName, Primitive x, Primitive y ) : void
shapeName Primitive /// The name of the shape to move. ///
x Primitive /// The x co-ordinate of the new position. ///
y Primitive /// The y co-ordinate of the new position. ///
return void

Font() public static method

Set shape Font.
public static Font ( Primitive shapeName, Primitive family, Primitive size, Primitive bold, Primitive italic ) : void
shapeName Primitive /// The shape or control name. ///
family Primitive The new font family name /// See LDUtilities.FontList() for available font families.
size Primitive The new font size.
bold Primitive The new font bold state ("True" or "False").
italic Primitive The new font italic state ("True" or "False").
return void

GetAllShapes() public static method

Get an array of all currently created shapes.
public static GetAllShapes ( ) : Primitive
return Primitive

GetAllShapesAt() public static method

Get an array of all of the shapes (if any) at the specified coordinates. The coordinates could be the mouse coordinates for example.
public static GetAllShapesAt ( Primitive x, Primitive y ) : Primitive
x Primitive The X coordinate
y Primitive The Y coordinate
return Primitive

GetColour() public static method

Get shape Brush and Pen colours.
public static GetColour ( Primitive shapeName ) : Primitive
shapeName Primitive /// The shape or control name. ///
return Primitive

GetLeft() public static method

Get the left position of a shape (works for triangles, polygons and lines). Also works for shapes while animating.
public static GetLeft ( Primitive shapeName ) : Primitive
shapeName Primitive /// The shape or control name. ///
return Primitive

GetOpacity() public static method

Gets the opacity of a shape.
public static GetOpacity ( Primitive shapeName ) : Primitive
shapeName Primitive /// The name of the shape. ///
return Primitive

GetProperties() public static method

Get a list of shape properties. These are .Net UIElement properties.
public static GetProperties ( Primitive shapeName ) : Primitive
shapeName Primitive The shape or control name.
return Primitive

GetProperty() public static method

Get a shape property. This is a .Net UIElement property.
public static GetProperty ( Primitive shapeName, Primitive property ) : Primitive
shapeName Primitive The shape or control name.
property Primitive The property name to get.
return Primitive

GetTop() public static method

Get the top position of a shape (works for triangles, polygons and lines). Also works for shapes while animating.
public static GetTop ( Primitive shapeName ) : Primitive
shapeName Primitive /// The shape or control name. ///
return Primitive

Height() public static method

Get the shape's visible (including zoom) height.
public static Height ( Primitive shapeName ) : Primitive
shapeName Primitive /// The shape or control name. ///
return Primitive

Move() public static method

Moves a triangle or polygon top-left position. This method also works for lines (Shapes.AddLine).
public static Move ( Primitive shapeName, Primitive x, Primitive y ) : void
shapeName Primitive /// The shape name (a triangle, polygon or line shape). ///
x Primitive /// The X (left) coordinate for the triangle, polygon or line. ///
y Primitive /// The Y (top) coordinate for the triangle, polygon or line. ///
return void

MoveLine() public static method

Moves a line shape.
public static MoveLine ( Primitive shapeName, Primitive x1, Primitive y1, Primitive x2, Primitive y2 ) : void
shapeName Primitive /// The shape name (a line created with Shapes.AddLine). ///
x1 Primitive /// The first X coordinate to move the line to. ///
y1 Primitive /// The first Y coordinate to move the line to. ///
x2 Primitive /// The second X coordinate to move the line to. ///
y2 Primitive /// The second Y coordinate to move the line to. ///
return void

MovePolygon() public static method

Moves a polygon shape.
public static MovePolygon ( Primitive shapeName, Primitive points ) : void
shapeName Primitive /// The shape name (a polygon created with LDShapes.AddPolygon). ///
points Primitive /// An array of new coordinates for the polygon corners with the form points[i][1] = x, points[i][2] = y. /// /// The number of points must be 3 or more and can change with each call. ///
return void

MoveTriangle() public static method

Moves a triangle shape.
public static MoveTriangle ( Primitive shapeName, Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive x3, Primitive y3 ) : void
shapeName Primitive /// The shape name (a triangle created with Shapes.AddTriangle). ///
x1 Primitive /// The first X coordinate to move the triangle to. ///
y1 Primitive /// The first Y coordinate to move the triangle to. ///
x2 Primitive /// The second X coordinate to move the triangle to. ///
y2 Primitive /// The second Y coordinate to move the triangle to. ///
x3 Primitive /// The third X coordinate to move the triangle to. ///
y3 Primitive /// The third Y coordinate to move the triangle to. ///
return void

Overlap() public static method

Checks for shape overlap (collision detection for any ellipse or rectangle shape types). The first shape should be unZoomed and unRotated.
public static Overlap ( Primitive shape1, Primitive shape2 ) : Primitive
shape1 Primitive /// The first shape name. ///
shape2 Primitive /// The second shape name. ///
return Primitive

OverlapBox() public static method

Checks for shape overlap of bounding boxes (collision detection).
public static OverlapBox ( Primitive shape1, Primitive shape2 ) : Primitive
shape1 Primitive /// The first shape name. ///
shape2 Primitive /// The second shape name. ///
return Primitive

OverlapCircle() public static method

Checks for shape overlap of bounding circles (collision detection).
public static OverlapCircle ( Primitive shape1, Primitive shape2 ) : Primitive
shape1 Primitive /// The first shape name. ///
shape2 Primitive /// The second shape name. ///
return Primitive

PenColour() public static method

Set shape Pen colour.
public static PenColour ( Primitive shapeName, Primitive colour ) : void
shapeName Primitive /// The shape or control name. ///
colour Primitive /// The new pen colour. ///
return void

PenStyle() public static method

Set shape Pen style (dash, dot etc).
public static PenStyle ( Primitive shapeName, Primitive dash, Primitive space ) : void
shapeName Primitive /// The shape name. ///
dash Primitive /// The dash length. ///
space Primitive /// The space length. ///
return void

PenWidth() public static method

Set shape Pen width.
public static PenWidth ( Primitive shapeName, Primitive width ) : void
shapeName Primitive /// The shape or control name. ///
width Primitive /// The new pen width. ///
return void

RasteriseTurtleLines() public static method

Rasterise all turtle trail lines. When the number of turtle trails is large the program may slow due to the number of line shapes (trails) present. This converts the turtle trails from line shapes to background drawings.
public static RasteriseTurtleLines ( ) : void
return void

ReSize() public static method

Resize shape width and height (an absolute version of zoom).
public static ReSize ( Primitive shapeName, Primitive width, Primitive height ) : void
shapeName Primitive /// The shape or control name. ///
width Primitive /// The shape width. ///
height Primitive /// The shape height. ///
return void

RemoveTurtleLines() public static method

Remove all turtle trail lines.
public static RemoveTurtleLines ( ) : void
return void

ResetTurtle() public static method

Reset the Turtle after a GraphicsWindow.Clear().
public static ResetTurtle ( ) : void
return void

RotateAbout() public static method

Rotate a shape about a point.
public static RotateAbout ( Primitive shapeName, Primitive x, Primitive y, Primitive angle ) : void
shapeName Primitive /// The shape name. ///
x Primitive /// The X coordinate to rotate the shape about. ///
y Primitive /// The Y coordinate to rotate the shape about. ///
angle Primitive /// The angle in degrees to rotate the shape. ///
return void

SetImage() public static method

Set or change an image in a button or image shape.
public static SetImage ( Primitive shapeName, Primitive imageName ) : void
shapeName Primitive /// The image or button name. ///
imageName Primitive /// The image to load. /// Value returned from ImageList.LoadImage or local or network image file. ///
return void

SetProperty() public static method

Set a shape property. This is a .Net UIElement property.
public static SetProperty ( Primitive shapeName, Primitive property, Primitive value ) : void
shapeName Primitive The shape or control name.
property Primitive The property name to set.
value Primitive The value to set the property to.
return void

SetShapeEvent() public static method

Register a shape to record mouse events: MouseDown, MouseUp, MouseEnter, MouseLeave, GotFocus and LostFocus.
public static SetShapeEvent ( Primitive shapeName ) : void
shapeName Primitive The shape or control to add.
return void

SetSize() public static method

Reset the size of a shape as if it was created with the new size. The position (top left point) is unchanged.
public static SetSize ( Primitive shapeName, Primitive width, Primitive height ) : void
shapeName Primitive /// The shape or control name. ///
width Primitive /// The shape width. ///
height Primitive /// The shape height. ///
return void

SetTurtleImage() public static method

Set the turtle to an image.
public static SetTurtleImage ( Primitive imageName, Primitive size ) : void
imageName Primitive /// The image to load for the turtle. /// Value returned from ImageList.LoadImage or local or network image file. ///
size Primitive /// The size to scale the turtle to (default turtle is 16). ///
return void

Skew() public static method

Skews the shape with the specified name by the specified angles.
public static Skew ( Primitive shapeName, Primitive angleX, Primitive angleY ) : void
shapeName Primitive /// The name of the shape to skew. ///
angleX Primitive /// The angle to skew the shape in the X direction. ///
angleY Primitive /// The angle to skew the shape in the Y direction. ///
return void

Width() public static method

Get the shape's visible (including zoom) width.
public static Width ( Primitive shapeName ) : Primitive
shapeName Primitive /// The shape or control name. ///
return Primitive

ZIndex() public static method

Set shape z index (layer position negative are background and positive are foreground - default 0).
public static ZIndex ( Primitive shapeName, Primitive z_index ) : void
shapeName Primitive /// The shape or control name. ///
z_index Primitive /// The z-index (zero, positive or negative interger). ///
return void

ZoomAll() public static method

Zoom all shapes.
public static ZoomAll ( Primitive scaleX, Primitive scaleY ) : void
scaleX Primitive The x-axis zoom level.
scaleY Primitive The y-axis zoom level.
return void

Property Details

brushes public_oe static_oe property

public static List brushes
return List