This package provides a lightweight 2D graphics system designed to allow the easy implementation of charts, graphs, or any other 2D graphics.
Description
Example
| Example | |
![]() | |
{import * from CURL.GUI.SHAPES}
{Canvas
width = 3in,
height = 2in,
{GraphicShape
{Frame
vorigin = "top",
horigin = "left",
width = 1.5in,
{text
This is a pie chart made up of several overlapping
EllipseShapes.
}
}
},
{EllipseShape
{GRect -2in, 3in, 0in, 1in},
border-color = "black",
border-width = 1pt,
color = "red",
start-angle = 0deg,
stop-angle = 30% * 360deg,
{on PointerEnter at shape:Shape do
set shape.color = "cyan"
},
{on PointerLeave at shape:Shape do
set shape.color = "red"
}
},
{EllipseShape
{GRect -2in, 3in, 0in, 1in},
border-color = "black",
border-width = 1pt,
color = "blue",
start-angle = 30% * 360deg,
stop-angle = 85% * 360deg,
{on PointerEnter at shape:Shape do
set shape.color = "cyan"
},
{on PointerLeave at shape:Shape do
set shape.color = "blue"
}
},
{EllipseShape
{GRect -2in, 3in, 0in, 1in},
border-color = "black",
border-width = 1pt,
color = "green",
start-angle = 85% * 360deg,
stop-angle = 95% * 360deg,
{on PointerEnter at shape:Shape do
set shape.color = "cyan"
},
{on PointerLeave at shape:Shape do
set shape.color = "green"
}
},
{EllipseShape
{GRect -2in, 3in, 0in, 1in},
border-color = "black",
border-width = 1pt,
color = "grey",
start-angle = 95% * 360deg,
stop-angle = 100% * 360deg,
{on PointerEnter at shape:Shape do
set shape.color = "cyan"
},
{on PointerLeave at shape:Shape do
set shape.color = "grey"
}
}
}
|