ClipTestPolygon.frink

Download or view ClipTestPolygon.frink in plain text format


// Test a triangular clipping region (that will clip a circle.)
g = new graphics

p = new polygon
p.addPoint[-1, 1]
p.addPoint[1, 1]
p.addPoint[0, -1]

g.clip[p]

g.fillEllipseCenter[0,1/3,1.7,1.7]
g.stroke[.1]
g.color[0,0,1]
g.drawEllipseCenter[0,1/3,1.7,1.7]
g.show[]
g.write["path.svg", 500, 500]
g.write["path.jpg", 500, 500]
g.write["path.html", 500, 500]
browse["path.html"]
browse["path.svg"]


Download or view ClipTestPolygon.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20136 days, 4 hours, 0 minutes ago.