Reference

Geometric primitives

Graphics.Vec2Type
Vec2(x, y) -> v

Create a Cartesian representation v of a vector (or point) in two dimensions.

source
Graphics.PointType
Point(x, y) -> p

Create a Cartesian representation p of a point in two dimensions.

source
Graphics.BoundingBoxType
BoundingBox(xmin, xmax, ymin, ymax) -> bb

Create a representation bb of a rectangular region, specifying the coordinates of the horizontal (x) and vertical (y) edges.

source

Geometry API

Missing docstring.

Missing docstring for center. Check Documenter's build log for details.

Graphics.deformFunction
deform(bb::BoundingBox, Δl, Δr, Δt, Δb) -> bbnew

Add Δl (left), Δr (right), Δt (top), and Δb (bottom) to the edges of a BoundingBox.

source
Missing docstring.

Missing docstring for diagonal. Check Documenter's build log for details.

Graphics.isinsideFunction
isinside(bb::BoundingBox, p::Point) -> tf::Bool
isinside(bb::BoundingBox, x, y) -> tf::Bool

Determine whether the point lies within bb.

source
Graphics.shiftFunction
shift(bb::BoundingBox, Δx, Δy) -> bbnew

Shift center by (Δx,Δy), keeping width & height fixed.

source
Missing docstring.

Missing docstring for height. Check Documenter's build log for details.

Missing docstring.

Missing docstring for width. Check Documenter's build log for details.

Missing docstring.

Missing docstring for xmin. Check Documenter's build log for details.

Missing docstring.

Missing docstring for xmax. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ymin. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ymax. Check Documenter's build log for details.

Missing docstring.

Missing docstring for xrange. Check Documenter's build log for details.

Missing docstring.

Missing docstring for yrange. Check Documenter's build log for details.

2d drawing contexts

Missing docstring.

Missing docstring for GraphicsDevice. Check Documenter's build log for details.

Missing docstring.

Missing docstring for GraphicsContext. Check Documenter's build log for details.

Missing docstring.

Missing docstring for creategc. Check Documenter's build log for details.

Missing docstring.

Missing docstring for getgc. Check Documenter's build log for details.

Coordinate systems

Graphics.set_coordinatesFunction
set_coordinates(c::GraphicsContext, device::BoundingBox, user::BoundingBox)
set_coordinates(c::GraphicsContext, user::BoundingBox)

Set the device->user coordinate transformation of c so that device, expressed in "device coordinates" (pixels), is equivalent to user as expressed in "user coordinates". If device is omitted, it defaults to the full span of c, BoundingBox(0, width(c), 0, height(c)).

See also get_matrix, set_matrix.

source
Missing docstring.

Missing docstring for reset_transform. Check Documenter's build log for details.

Graphics.rotateFunction
rotate(p::Vec2, angle::Real, o::Vec2) -> pnew

Rotate p around o by angle.

source
rotate(bb::BoundingBox, angle, o) -> bbnew

Rotate bb around o by angle, returning the BoundingBox that encloses the vertices of the rotated box.

source
Missing docstring.

Missing docstring for scale. Check Documenter's build log for details.

Missing docstring.

Missing docstring for translate. Check Documenter's build log for details.

Missing docstring.

Missing docstring for user_to_device!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for device_to_user!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for user_to_device_distance!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for device_to_user_distance!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for user_to_device. Check Documenter's build log for details.

Missing docstring.

Missing docstring for device_to_user. Check Documenter's build log for details.

Lines

Missing docstring.

Missing docstring for set_line_width. Check Documenter's build log for details.

Missing docstring.

Missing docstring for set_dash. Check Documenter's build log for details.

Colors and painting (drawing attributes)

Missing docstring.

Missing docstring for set_source. Check Documenter's build log for details.

Missing docstring.

Missing docstring for set_source_rgb. Check Documenter's build log for details.

Missing docstring.

Missing docstring for set_source_rgba. Check Documenter's build log for details.

Missing docstring.

Missing docstring for save. Check Documenter's build log for details.

Missing docstring.

Missing docstring for restore. Check Documenter's build log for details.

Clipping

Missing docstring.

Missing docstring for clip. Check Documenter's build log for details.

Missing docstring.

Missing docstring for clip_preserve. Check Documenter's build log for details.

Missing docstring.

Missing docstring for reset_clip. Check Documenter's build log for details.

Graphics.inner_canvasFunction
inner_canvas(c::GraphicsContext, device::BoundingBox, user::BoundingBox)
inner_canvas(c::GraphicsContext, x, y, w, h, l, r, t, b)

Create a rectangular drawing area inside device (represented in device-coordinates), giving it user-coordinates user. Any drawing that occurs outside this box is clipped.

x, y, w, and h are an alternative parametrization of device, and l, r, t, b parametrize user.

See also: set_coordinates.

source

Paths

Missing docstring.

Missing docstring for move_to. Check Documenter's build log for details.

Missing docstring.

Missing docstring for line_to. Check Documenter's build log for details.

Missing docstring.

Missing docstring for rel_line_to. Check Documenter's build log for details.

Missing docstring.

Missing docstring for rel_move_to. Check Documenter's build log for details.

Missing docstring.

Missing docstring for new_path. Check Documenter's build log for details.

Missing docstring.

Missing docstring for new_sub_path. Check Documenter's build log for details.

Missing docstring.

Missing docstring for close_path. Check Documenter's build log for details.

Missing docstring.

Missing docstring for arc. Check Documenter's build log for details.

High-level paths

Missing docstring.

Missing docstring for rectangle. Check Documenter's build log for details.

Missing docstring.

Missing docstring for circle. Check Documenter's build log for details.

Missing docstring.

Missing docstring for polygon. Check Documenter's build log for details.

Fill and stroke

Missing docstring.

Missing docstring for fill. Check Documenter's build log for details.

Missing docstring.

Missing docstring for fill_preserve. Check Documenter's build log for details.

Missing docstring.

Missing docstring for paint. Check Documenter's build log for details.

Missing docstring.

Missing docstring for stroke. Check Documenter's build log for details.

Missing docstring.

Missing docstring for stroke_preserve. Check Documenter's build log for details.

Missing docstring.

Missing docstring for stroke_transformed. Check Documenter's build log for details.

Missing docstring.

Missing docstring for stroke_transformed_preserve. Check Documenter's build log for details.