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

Version Path
wxruby3-0.9.8 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.7 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.5 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.4 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.3 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.2 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.1 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.0 rakelib/lib/generate/doc/graphics_context.yaml
wxruby3-0.9.0.pre.rc.3 rakelib/lib/generate/doc/graphics_context.yaml