tycho: add painter test

master
an 2019-07-12 12:02:53 -04:00
parent 0a0b6f9c5f
commit 9625eb1618
1 changed files with 12 additions and 0 deletions

View File

@ -20,7 +20,19 @@ impl IMapViewTrait for IMapView
fn draw_view(&self, paint: *mut cc::QPainter)
{
cc::paint_fg(paint, 0, 255, 0, 255);
cc::paint_arc(paint, 30, 30, 100, 100, 77, 440);
cc::paint_chord(paint, 50, 50, 100, 100, 77, 440);
cc::paint_ellipse(paint, 80, 80, 30, 30);
cc::paint_image(paint, 200, 10, ":/tycho/images/tycho1.png");
cc::paint_line(paint, 100, 60, 140, 100);
cc::paint_point(paint, 20, 20);
cc::paint_polygon(paint, &[cc::Int2{x: 250, y: 170},
cc::Int2{x: 270, y: 190},
cc::Int2{x: 230, y: 190}]);
cc::paint_rect(paint, 150, 170, 20, 20);
cc::paint_squircle(paint, 90, 170, 30, 30, 7, 9);
cc::paint_text(paint, 50, 50, "hello, world");
}
}