CanvasContext

Revision as of 22:42, 24 May 2017 by Lchrisman (talk | contribs) (Created page with "''New in Analytica 5.0'' == CanvasContext( canvas'', clip, rotAngle, rotx, roty, shiftx, shifty, scalex, scaley'' ) == Returns a drawing context with a new clip region o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

New in Analytica 5.0

CanvasContext( canvas, clip, rotAngle, rotx, roty, shiftx, shifty, scalex, scaley )

Returns a drawing context with a new clip region or coordinate system. The result can be passed to the «canvas» parameter of any of the Canvas functions.

The clip or coordinate system of the original canvas or context is not changed, and you can continue to draw to the original canvas or coordinate system or to the new canvas.

Parameters

  • «canvas» is a canvas obtained from calling the Canvas() function, or a canvas context obtained by calling the CanvasContext() function.
  • «clip»: (Optional) When specified, four numbers must be provided: x1, y1, x2, y2. See #Clipping below.
  • «rotAngle», «rotx», «roty»: (Optional) Specifies the rotation. See #Rotations below.
  • «shiftx», «shifty»: (Optional) Specifies a translation for the context's coordinate system relative to the original coordinate system. See #Shifting below.
  • «scalex», «scaley»: (Optional) Specifies a scaling for the context's coordinate system -- how many of the original context's units correspond to one unit in the new coordinate system. See #Scaling below.

When multiple context changes are specified in one call, they are applied in this order: Rotation, translation, scaling then clipping. See #Order of context changes below.

Clipping

Rotating

Shifting

Scaling

Order of context changes

See also

Comments


You are not allowed to post comments.