Dialog():canvas{
onpaint = function(ev)
local ctx = ev.context
-- ctx is a GraphicsContext
end
}Gets the width of the visible area in pixels.
Gets the height of the visible area in pixels.
It's true or false in case that you want to paint paths using antialiasing.
local color = gc.color
gc.color = Color(255)Gets or sets the color to paint with the path functions.
gc:save()Saves current clipping information to restore it later.
gc:restore()gc:clip()Sets the current path as a clipping area for following drawing operations.
gc:strokeRect(rectangle)Paints the edges of the given rectangle with the current color.
gc:fillRect(rectangle)Fills the given rectangle with the current color.
gc:fillText(string, x, y)local size = gc:measureText(string)Returns the size of the text using the current font.
gc:drawImage(image, x, y)
gc:drawImage(image, srcRect, dstRect)
gc:drawImage(image, srcX, srcY, srcW, srcH, dstX, dstY, dstW, dstH)gc:drawThemeImage(partId, point)
gc:drawThemeImage(partId, x, y)gc:drawThemeRect(partId, rectangle)
gc:drawThemeRect(partId, x, y, w, h)gc:beginPath()gc:closePath()gc:moveTo(x, y)gc:lineTo(x, y)gc:cubicTo(cp1x, cp1y, cp2x, cp2y, x, y)gc:rect(rectangle)gc:roundedRect(rectangle, rx, ry)gc:stroke()Paints the edges of the current path with the current color.
gc:fill()Fills the current path with the current color.