Xinf API Reference
Back | Index
class xinf.ony.Element
extends StyledElement
var display :Display [EnumTrait<Display>]
var visibility :Visibility [EnumTrait<Visibility>]
var opacity :Null<Float> [BoundedFloatTrait]
var fill :Paint [PaintTrait]
var fillOpacity :Null<Float> [BoundedFloatTrait]
var stroke :Paint [PaintTrait]
var strokeWidth :Null<Float> [LengthTrait]
var strokeOpacity :Null<Float> [BoundedFloatTrait]
var strokeLinejoin :JoinStyle [EnumTrait<JoinStyle>]
var strokeLinecap :CapsStyle [EnumTrait<CapsStyle>]
var strokeMiterlimit :Null<Float> [FloatTrait]
var fontFamily :StringList [StringListTrait]
var fontSize :Float [LengthTrait]
var textAnchor :TextAnchor [EnumTrait<TextAnchor>]
var transform :Transform
the Element's transformation
function new( ?traits:Dynamic ) :Void
function getBoundingBox( ) :TRectangle
the bounding box of the element
function retransform( ) :Void
schedule this Object for redefining it's transformation
You should usually not need to call this yourself, the Object will be automatically scheduled when you modify it's transformation.
function redraw( ) :Void
schedule this Object for redrawing
The Object will (on JavaScript: should) be redrawn before the next frame is shown to the user. Call this function whenever your Object needs to redraw itself because it's (immediate) content changed - there's no need to call it if anything changes about it's children.
function globalToLocal( p:TPoint ) :TPoint
convert the given point from global to local coordinates
function localToGlobal( p:TPoint ) :TPoint
convert the given point from local to global coordinates
function dispatchEvent<T>( e:Event<T> ) :Void
dispatch the given Event
tries to dispatch the given Event to any registered listeners. If no handler is found, 'bubble' the Event - i.e., pass it up to our parent.
Back | Index