Sha256: f3321a99c8c90d2ef0878624f32ea9a3def32e5be8f17353f55465280c7741d1
Contents?: true
Size: 1.49 KB
Versions: 8
Compression:
Stored size: 1.49 KB
Contents
--- :wxGraphicsContext: :detail: :pre: :programlisting: - :pattern: !ruby/regexp /.*/ :replace: | ```ruby class MyCanvas < Wx::ScrolledWindow def on_paint(event) # Create paint DC self.paint do |dc| # Create graphics context from it Wx::GraphicsContext.draw_on(dc) do |gc| # make a path that contains a circle and some lines gc.set_pen(Wx::RED_PEN) path = gc.create_path path.add_circle(50.0, 50.0, 50.0) path.move_to_point(0.0, 50.0) path.add_line_to_point(100.0, 50.0) path.move_to_point(50.0, 0.0) path.add_line_to_point(50.0, 100.0) path.close_sub_path path.add_rectangle(25.0, 25.0, 50.0, 50.0) gc.stroke_path(path) end end end end end ``` :wxGraphicsPenInfo: :detail: :pre: :programlisting: - :pattern: !ruby/regexp /.*/ :replace: | ```ruby ctx = Wx::GraphicsContext.create(dc) ctx.set_pen(Wx::GraphicsPenInfo.new(Wx::BLUE).width(1.25).style(Wx::PENSTYLE_DOT)) ```
Version data entries
8 entries across 8 versions & 1 rubygems