search for: draw_text

Displaying 17 results from an estimated 17 matches for "draw_text".

2007 Apr 29
0
[981] branches/wxruby2/wxwidgets_282/samples/caret/caret.rb: Don''t call PaintDC.new; just refresh() instead of duplicating paint code
...- prepare_dc(dc) - dc.clear </del><ins>+ paint do | dc | + dc.clear + dc.set_font(@font) </ins><span class="cx"> </span><del>- dc.set_font(@font) - - for y in 0 ... @y_chars - line = @text[@x_chars * y,@x_chars] - dc.draw_text( line, @x_margin, @y_margin + y * @height_char ) </del><ins>+ for y in 0 ... @y_chars + line = @text[@x_chars * y,@x_chars] + dc.draw_text( line, @x_margin, @y_margin + y * @height_char ) + end </ins><span class="cx"> end </span>&l...
2006 Oct 17
0
[680] trunk/wxruby2/samples/printing/printing.rb: Cleaned up to use the Ruby naming convention, added #! line, now uses Wx default ID''s in standard menu items.
...class="cx"> WXPRINT_ANGLEUP = 110 </span><span class="cx"> WXPRINT_ANGLEDOWN = 111 </span><span class="lines">@@ -54,10 +58,8 @@ </span><span class="cx"> </span><span class="cx"> dc.draw_text( "Test message: this is in 10 point text", 10, 180) </span><span class="cx"> </span><del>-#if wxUSE_UNICODE </del><span class="cx"> test = "Hebrew שלום -- Japanese (日本語)" </span><span class="cx"&g...
2006 Nov 13
0
[739] trunk/wxruby2/samples/dialogs/dialogs.rb: Changed back to using block version of paint in on_paint method.
..."cx"> end </span><span class="cx"> </span><span class="cx"> def on_paint(event) </span><del>- dc = PaintDC.new(self) - dc.set_text_foreground( get_app.canvas_text_colour ) - dc.set_font( get_app.canvas_font ) - dc.draw_text("Windows common dialogs test application", 10, 10) </del><ins>+ paint do |dc| + dc.set_text_foreground( get_app.canvas_text_colour ) + dc.set_font( get_app.canvas_font ) + dc.draw_text("Windows common dialogs test application", 10, 10) + end <...
2011 May 08
2
Device context (get_dc) Question from printing.rb in wxRuby samples
...e == 1 draw_page_one(dc) ##-- dc = device context passed in elsif (page == 2) draw_page_two(dc) ##-- dc = device context passed in end dc.set_device_origin(0, 0) dc.set_user_scale(1.0, 1.0) buf = "PAGE #{page}" dc.draw_text(buf, 10, 10) return true else return false end end #--end of on_print_page -- Ann Maybury ann.maybury@gmail.com _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2004 Jun 22
8
Tracking Mouse motion
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: tst_wxPaint.rbw Type: application/octet-stream Size: 4446 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20040622/abc8ba85/tst_wxPaint-0001.obj
2008 Jan 14
15
How to get a Window handle from another app?
Hello, I would like to get a window handle from another app outside of wxRuby and convert it into a wxRuby Window handle so that I can use it as the parent Window for several wxRuby child windows. Basically I want to use the FRAME_FLOAT_ON_PARENT window style so that my wxRuby windows become associated with the outside app kind of like toolbars, e.g., they don''t show up in the
2006 Dec 03
0
[776] trunk/wxruby2: Added Bitmap#draw method, updated sample
...ass="cx"> </span><span class="cx"> bitmap = Bitmap.new( 100, 100 ) </span><del>- dc = MemoryDC.new - dc.select_object( bitmap ) - dc.set_pen(GREEN_PEN) - dc.clear() - dc.draw_ellipse(5, 5, 90, 90) - dc.draw_text("Bitmap", 30, 40) - dc.select_object( NULL_BITMAP ) </del><ins>+ bitmap.draw do | dc | + dc.clear() + dc.set_pen(GREEN_PEN) + dc.draw_ellipse(5, 5, 90, 90) + dc.draw_text("Bitmap", 30, 40) + end </ins>&lt...
2007 Nov 18
4
set background label to transparent??
I just use wxRuby and I have problem I use background image on my app and when I create label it seem look background of label is gray, how can I change it into transparent???? -- Posted via http://www.ruby-forum.com/.
2004 Aug 03
1
Drawing
Anyone know how to draw in wxRuby? I want to draw a graph, and have it update as new data comes in. I see stuff about Device Contexts, but I can''t find anything about how to use them, associate them with a panel, or anything like that. -Kurt
2007 Mar 06
0
[876] trunk/wxruby2/samples/printing/printing.rb: Fix a crasher if scale = 0; fix variable rename
...uot;cx"> # change. But w might be the preview bitmap width, so scale down. </span><span class="cx"> overall_scale = scale * (w/page_width) </span><span class="lines">@@ -391,8 +390,8 @@ </span><span class="cx"> dc.draw_text(text, x_pos.to_i, top_margin_logical) </span><span class="cx"> </span><span class="cx"> dc.set_pen(Wx::BLACK_PEN) </span><del>- dc.draw_line( left_margin_logical, (top_margin_logical+y_extent).to_i, - right_margin_logi...
2006 Oct 21
6
Window#paint patch
Attached is a patch and some extra files to fix our ObjectPreviouslyDeleted crasher with the paint method. As discussed, it just re-implements the method in Ruby. I created a directory lib/wx/classes as a place to hold Ruby extensions to the API. The attached app.rb and window.rb files should be added to it. When this patch is applied, files in that directory are automatically required on
2006 Oct 23
0
[709] trunk/wxruby2/samples/dialogs/dialogs.rb: Use paint method again, remove unnecessary global (Alex Fenton)
...aint do | dc | </span><del>- p dc </del><span class="cx"> dc.set_text_foreground( get_app.canvas_text_colour ) </span><span class="cx"> dc.set_font( get_app.canvas_font ) </span><span class="cx"> dc.draw_text("Windows common dialogs test application", 10, 10) </span><span class="lines">@@ -229,15 +223,15 @@ </span><span class="cx"> </span><span class="cx"> def onChooseFont(event) </span><span class="cx">...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
....y) + dc.set_pen Wx::LIGHT_GREY_PEN + dc.set_pen Wx::LIGHT_GREY_PEN + dc.draw_line(0, 0, size.x, size.y) + dc.draw_line(0, size.y, size.x, 0) + + msg = "Size: %d x %d" % [ size.x, size.y ] + width, height = dc.get_text_extent(msg) + height += 3 + dc.draw_text(msg, + (size.x - width) / 2, + (size.y - ( height * 5 ) ) / 2 ) + + if @mgr + pi = @mgr.get_pane(self) + msg = "Layer: %d" % pi.dock_layer + width, height = dc.get_text_extent(msg) + dc.draw_text(msg, +...
2007 May 10
11
wxRuby2 0.0.40
Congratulations, wxRuby2 0.0.40 but,where is 0.0.40 mswin32.gem? _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Nov 13
7
[736] trunk/wxruby2/samples/dialogs/dialogs.rb: Fixed crashing bug in on_paint and made the code style more Ruby like.
...="cx"> end </span><span class="cx"> </span><span class="cx"> def on_paint(event) </span><del>- paint do | dc | - dc.set_text_foreground( get_app.canvas_text_colour ) - dc.set_font( get_app.canvas_font ) - dc.draw_text("Windows common dialogs test application", 10, 10) - end </del><ins>+ dc = PaintDC.new(self) + dc.set_text_foreground( get_app.canvas_text_colour ) + dc.set_font( get_app.canvas_font ) + dc.draw_text("Windows common dialogs test application", 10, 10) &...
2007 Mar 27
0
[922] branches/wxruby2/wxwidgets_282: Changes, additions and deprecations 2.6 -> 2.8 Wx API
...class="cx"> * "DC#cache_enabled":#DC_cacheenabled </span><span class="cx"> * "DC#calc_bounding_box":#DC_calcboundingbox </span><span class="lines">@@ -60,7 +67,6 @@ </span><span class="cx"> * "DC#draw_text":#DC_drawtext </span><span class="cx"> * "DC#enable_cache":#DC_enablecache </span><span class="cx"> * "DC#end_doc":#DC_enddoc </span><del>-* "DC#end_drawing":#DC_enddrawing </del><span class="cx...
2006 Nov 26
0
[758] trunk/wxruby2: i18n support: added Locale class, methods for get/set languages & encodings
...T - -SMALL_FONT\\ -ITALIC_FONT\\ -SWISS_FONT* - </del><span class="cx"> h2. See also </span><span class="cx"> </span><span class="cx"> "Font overview":fontoverview.html, "DC#set_font":dc.html#DC_setfont, "DC#draw_text":dc.html#DC_drawtext, "DC#get_text_extent":dc.html#DC_gettextextent, "FontDialog":fontdialog.html, "SystemSettings":systemsettings.html </span><span class="lines">@@ -156,9 +132,17 @@ </span><span class="cx"> </span&...