mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 20:51:09 +02:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
32 lines
814 B
Python
32 lines
814 B
Python
# For an explanation of the fill rules see
|
|
# http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-rule-t
|
|
|
|
snippet_normalize(cr, width, height)
|
|
cr.set_line_width(0.02)
|
|
|
|
cr.rectangle (0.04, 0.04, 0.90, 0.27);
|
|
cr.new_sub_path ();
|
|
cr.arc (0.25, 0.25, 0.15, 0, 2*M_PI);
|
|
cr.new_sub_path ();
|
|
cr.arc_negative (0.75, 0.25, 0.15, 0, -2*M_PI);
|
|
|
|
cr.set_fill_rule (cairo.FILL_RULE_EVEN_ODD);
|
|
cr.set_source_rgb (0, 0.7, 0);
|
|
cr.fill_preserve ();
|
|
cr.set_source_rgb (0, 0, 0);
|
|
cr.stroke ();
|
|
|
|
cr.translate (0, 0.50);
|
|
cr.rectangle (0.04, 0.04, 0.90, 0.27);
|
|
cr.new_sub_path ();
|
|
cr.arc (0.25, 0.25, 0.15, 0, 2*M_PI);
|
|
cr.new_sub_path ();
|
|
cr.arc_negative (0.75, 0.25, 0.15, 0, -2*M_PI);
|
|
|
|
cr.set_fill_rule (cairo.FILL_RULE_WINDING);
|
|
cr.set_source_rgb (0, 0, 0.9);
|
|
cr.fill_preserve ();
|
|
cr.set_source_rgb (0, 0, 0);
|
|
cr.stroke ();
|
|
|