PF2d::Drawable(T)
Instance methods
[]=(x, y, value)
Source[]=(point, value)
Sourcedraw(c : Circle, color)
Sourcedraw(line : PF2d::Line, color)
SourceDraw a circle using Bresenham’s Algorithm
draw_circle(c : Vec, r, color)
SourceDraw a line using Bresenham’s Algorithm
draw_line(line : PF2d::Line, color)
SourceBlends a point onto Drawable - requires Viewable
fill(c : Circle, color)
SourceFill a circle using Bresenham’s Algorithm
fill_circle(c : Circle, color)
SourceFill an abitrary polygon. Expects a clockwise winding of points TODO: create function to determine if inside poly
fill_poly(*points : PF2d::Vec, pixel)
Fill an abitrary polygon. Expects a clockwise winding of points TODO: create function to determine if inside poly
fill_rect(rect : PF2d::Rect, color)
SourceFills a spline by the clockwise winding rule
Draw a filled in triangle
Use Bresenham’s Algorithm to calculate points
paint_triangle(p1 : PF2d::Vec3(Float), p2 : PF2d::Vec3(Float), p3 : PF2d::Vec3(Float), t1 : PF2d::Vec, t2 : PF2d::Vec, t3 : PF2d::Vec, texture : PF2d::Viewable(T) | Nil, buffer : Drawable(Float), tint : T)
Sourcepaint_triangle(p1 : PF2d::Vec3(Int), p2 : PF2d::Vec3(Int), p3 : PF2d::Vec3(Int), t1 : PF2d::Vec, t2 : PF2d::Vec, t3 : PF2d::Vec, texture : PF2d::Viewable(T) | Nil, buffer : Drawable(Float), tint : T)
Draw a textured triangle