wxgraphicline
Description
A wxgraphicline object represents a line that can be drawn on an appropriate container. The line has a width and a color.
Type Tags
wxgraphic
Object Value
Properties
Property | Type | Description |
---|---|---|
_ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. |
__ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. |
container | type(wxgraphiccontainer) | Specifies the object to which this graphic belongs. |
name | string | The name of the wxgraphicline object. |
next | type(wxgraphic) |
Specifies the next wxgraphic on the same container.
|
point1 | fixedpoint | Gives the position of the starting point of the line. |
point2 | fixedpoint | Gives the position of the ending point of the line. |
rgb | rgb | Gives the color of the line. |
type | type | Specifies the wxgraphicline type object. |
visible | boolean | Specifies whether or not the line is visible. |
width | integer | Gives the width of the line, in pixels. |
Methods
remove()
Description
Removes the graphic from the container. If any object has a reference to the graphic, those references will no longer be valid. It is not safe to attempt to use a graphic after this method has been called.
Prototype
wxgraphiclinevar
.remove
()
Parameters
None
setname()
Description
Sets the name of the line graphic. The wxgraphicline object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxgraphiclinevar
.setname
(
string
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
name | None | string | The new name for the graphic. |
setnext()
Description
Sets the position of the graphic in the z-order and tab order.
Prototype
wxgraphiclinevar
.setnext
(
type(wxgraphic)
)
next
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
next | None | type(wxgraphic) |
Calling the method with the value .nul sets a graphic to be
the last one in the ring (the one before container.firstgraphic)
and so has the highest z-order, and passing any other graphic as
the argument puts the target graphic immediately below the one
specified as the parameter. The visible stacking of graphics on a
container is such that the earliest in the ring is the furthest
back in the z-order.
|
setposition()
Description
Sets the size and/or position of the graphic. The wxgraphicline object itself is returned, to allow multiple setting methods to be put into one expression. Not all parameters are available to all wxgraphic objects. It is recommended to name the parameters when using this method.
Prototype
wxgraphiclinevar
.setposition
(
point
,
point point1
,
point point2
,
point point3
,
integer midpoint
,
integer width
)
borderwidth
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
point1 | The current value of the point1 property | point | The new position of the starting point of the graphic. |
point2 | The current value of the point2 property | point | The new position of the second point of the graphic. |
point3 | The current value of the point3 property | point | The new position of the third point of the graphic. |
midpoint | The current value of the midpoint property | point | The new position of the midpoint of the graphic. |
width | The current value of the width property | integer | The new width of the graphic. |
borderwidth | The current value of the borderwidth property | integer | The new width of the border of the graphic. |
setrgb()
Description
Sets the color and border color of the graphic. The wxgraphicline object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxgraphiclinevar
.setrgb
(
integer
,
integer rgb
)
borderrgb
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rgb | The current value of the rgb property | integer | The new color of the graphic. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
borderrgb | The current value of the borderrgb property | integer | The new border color of the graphic. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
setvisible()
Description
Sets the visibility of the graphic. The wxgraphicline object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxgraphiclinevar
.setvisible
(
boolean
,
boolean visible
)
bordervisible
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
visible | None | boolean | The desired visibility of the content of the graphic. |
bordervisible | None | boolean | The desired visibility of the graphic's border. |