Sphere 2 Canvas.cloneSection

From Spheriki

Jump to: navigation, search

Clone a section of the canvas and return the resulting canvas.


Contents

Prototype

Canvas.cloneSection(section)


Parameters

  • section: A Rect object containing the position and dimensions of the section to clone.


Return Value

Returns a new Canvas object containing the cloned section.


Examples

local canvas = Canvas(100, 100);
local section = canvas.cloneSection(Rect(10, 10, 50, 30));

Clones the canvas section at (10, 10) with the dimensions 50 x 30.


See also

Personal tools