Sha256: 1348325bc62326a73b01210c34a3be167f823453748b3e477f0dcc5f134d62eb
Contents?: true
Size: 1.18 KB
Versions: 9
Compression:
Stored size: 1.18 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 ```
Version data entries
9 entries across 9 versions & 1 rubygems