Package | com.yworks.canvas.drawing |
Class | public class DefaultPaintContext |
Inheritance | DefaultPaintContext Object |
Implements | IPaintContext |
The viewTransform
, worldTransform
and transform
are initialized as identity
matrices.
Property | Defined By | ||
---|---|---|---|
canvasComponent : CanvasComponent [read-only]
The canvas component that the painting is performed to. | DefaultPaintContext | ||
transform : Matrix
The transform that is used to convert between the viewTransform
and the resulting worldTransform. | DefaultPaintContext | ||
viewTransform : Matrix
A transform that can be applied to the graphics context in order to paint
in the view coordinate system. | DefaultPaintContext | ||
worldTransform : Matrix
The transform that can be applied to the graphics context in order to paint
into the world coordinate system. | DefaultPaintContext |
Method | Defined By | ||
---|---|---|---|
DefaultPaintContext(canvasComponent:CanvasComponent) | DefaultPaintContext | ||
lookup(type:Class):Object
Returns an instance that implements the given type or null. | DefaultPaintContext | ||
toViewCoordinates(worldP:IMutablePoint):void
Converts the given set of world coordinates to a coordinate pair that can
be used to paint within the viewTransform. | DefaultPaintContext | ||
toWorldCoordinates(viewP:IMutablePoint):void | DefaultPaintContext |
canvasComponent | property |
canvasComponent:CanvasComponent
[read-only] The canvas component that the painting is performed to.
public function get canvasComponent():CanvasComponent
transform | property |
transform:Matrix
The transform that is used to convert between the viewTransform
and the resulting worldTransform
.
Coordinates transformed using this matrix can be drawn into a graphics
context that has the viewTransform
applied to appear to
be drawn into the world coordinate system.
viewTransform transform = worldTransform
public function get transform():Matrix
public function set transform(value:Matrix):void
viewTransform | property |
viewTransform:Matrix
A transform that can be applied to the graphics context in order to paint in the view coordinate system.
public function get viewTransform():Matrix
public function set viewTransform(value:Matrix):void
worldTransform | property |
worldTransform:Matrix
The transform that can be applied to the graphics context in order to paint into the world coordinate system.
public function get worldTransform():Matrix
public function set worldTransform(value:Matrix):void
DefaultPaintContext | () | Constructor |
public function DefaultPaintContext(canvasComponent:CanvasComponent)
Parameters
canvasComponent:CanvasComponent |
lookup | () | method |
public function lookup(type:Class):Object
Returns an instance that implements the given type or null
.
Typically, this method will be called in order to obtain a different view or
aspect of the current instance. This is quite similar to casting or using
a super type or interface of this instance, but is not limited to inheritance or
compile time constraints. An instance implementing this method is not
required to return non-null
implementations for the types, nor does it
have to return the same instance any time. Also it depends on the
type and context whether the instance returned stays up to date or needs to
be reobtained for subsequent use.
Parameters
type:Class — the type for which an instance shall be returned
|
Object — an instance that is assignable to type or null
|
See also
toViewCoordinates | () | method |
public function toViewCoordinates(worldP:IMutablePoint):void
Converts the given set of world coordinates to a coordinate pair that can
be used to paint within the viewTransform
.
Parameters
worldP:IMutablePoint — The point in the world coordinate system.
|
See also
toWorldCoordinates | () | method |