Sha256: ec7bfaaa7172cae2aced31269d1de91fad4f947f8aafc177cfc6b30e942e6112
Contents?: true
Size: 1.46 KB
Versions: 21
Compression:
Stored size: 1.46 KB
Contents
--- :wxMemoryDC: :detail: :pre: :programlisting: - :pattern: !ruby/regexp /\(test_bitmap\);/ :replace: | ```ruby Wx::MemoryDC.draw_on(test_bitmap) do |mem_dc| # We can now draw into the memory DC... # Copy from this DC to another DC. old_dc.blit(250, 50, BITMAP_WIDTH, BITMAP_HEIGHT, mem_dc, 0, 0) end ``` - :pattern: !ruby/regexp /wxNullBitmap/ :replace: '' - :pattern: !ruby/regexp /MyWindow::OnPaint/ :replace: | ```ruby class MyWindow def on_paint(_) bmp = Wx::Bitmap.new bmp.create_with_dip_size(get_client_size, get_dpi_scale_factor) Wx::MemoryDC.draw_on(bmp) do |mem_dc| ... use mem_dc to draw on the bitmap ... end self.paint do |dc| dc.draw_bitmap(bmp, Wx::Point.new(0, 0)) end end end ``` :para: - :pattern: !ruby/regexp /out of the memory DC:/ :subst: 'out of the memory DC. Note that when using the `.draw_on` method this will happen automatically when the block returns.' - :pattern: !ruby/regexp /This\s+happens\s+automatically.*goes\s+out\s+of\s+scope\./ :replace: ''
Version data entries
21 entries across 21 versions & 1 rubygems