search for: get_width

Displaying 18 results from an estimated 18 matches for "get_width".

2005 Jan 22
9
Dragging images across the canvas
...ap(@bitmap,nx,ny,false) dc.free end def on_motion(event) x = event.get_x y = event.get_y move_region(x,y) if (@left_dn and (@reg.contains(x,y) == 0)) end def on_paint paint{|dc| dc.clear dc.draw_bitmap(@bitmap, 0, 0, false) } w,h = @bitmap.get_width, @bitmap.get_height @reg = Wx::Region.new(0,0,w,h) end end class ImagesApp < Wx::App def on_init frame = MyFrame.new("Simple Image Demo") frame.show end end Wx::init_all_image_handlers a = ImagesApp.new a.main_loop() __END__ _____________________________...
2009 Mar 23
3
How to put a background image on a panel
Well I''ve made a lot of progress on my app, but I''m stuck on figuring out how to add a bitmap. I have a notebook and a page panel. On this panel I want to put a backdrop image and scale it to the size of the panel. How do I do this? I looked at some of the samples related to bitmaps and I could not see how to apply that to my situation. Thanks, T.
2007 May 22
0
[1030] trunk/wxruby2/samples/printing/printing.rb: Fix so will print again.
...;span class="cx"> max_y += (2*margin_y) </span><span class="cx"> </span><span class="cx"> # Get the size of the DC in pixels </span><del>- w, h = dc.get_size </del><ins>+ size = dc.get_size + w = size.get_width + h = size.get_height </ins><span class="cx"> </span><span class="cx"> # Calculate a suitable scaling factor </span><span class="cx"> scale_x=(w/max_x) </span><span class="lines">@@ -306,7 +308,9 @@...
2004 Jan 08
3
pictorG
...=========================================== class MyImageFrame < Dialog # -- opens a dialog to show a picture def initialize parent, title, filename super(parent, -1, title) @bitmap=Bitmap.new(filename,BITMAP_TYPE_ANY) # why should I say BITMAP_TYPE_ANY? set_client_size_wh(@bitmap.get_width,@bitmap.get_height) evt_paint {on_paint()} evt_left_down {on_click()} end def on_click @bitmap.destroy() self.destroy() end def on_paint dc = PaintDC.new(self) dc.draw_bitmap(@bitmap,0,0,true) end end class Pictures < ListCtrl # -- show the pictures def ini...
2006 Dec 26
0
[806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
...rsor.busy do |x| - icons = [ - Wx::Icon.new("icon1.xpm"), - Wx::Icon.new("icon2.xpm"), - Wx::Icon.new("icon3.xpm"), - Wx::Icon.new("icon4.xpm"), - Wx::Icon.new("icon5.xpm")] - - orig_size = icons[0].get_width() - for i in 0 ... icons.length - if size == orig_size - images.add(icons[i]) - else - images.add(icons[i]) - end </del><ins>+ Wx::BusyCursor.busy do + icons = (1 .. 5).map do | i | + icon_file = File.join(File.dirname(__FILE__)...
2004 Feb 02
0
the sample
...es magyar php dokumentacio: http://hu.php.net --+ -------------- next part -------------- #!/usr/bin/ruby require ''wxruby'' include Wx class MyImageFrame < Dialog def initialize parent, title, bmap super(parent, -1, title) @bitmap=bmap set_client_size_wh(@bitmap.get_width,@bitmap.get_height) evt_paint {|what| on_paint(what)} evt_left_down {on_click()} end def on_click close end def on_paint what dc = PaintDC.new(self) dc.draw_bitmap(@bitmap,0,0,true) end end class MyFrame < Wx::Frame def initialize(title) super(nil, -1, titl...
2007 Jan 03
0
[823] trunk/wxruby2/doc/textile: Remove docs for some deprecated classes
...get_height":#TabControl_getheight -* "TabControl#get_id":#TabControl_getid -* "TabControl#get_label":#TabControl_getlabel -* "TabControl#get_row_position":#TabControl_getrowposition -* "TabControl#get_selected":#TabControl_getselected -* "TabControl#get_width":#TabControl_getwidth -* "TabControl#get_x":#TabControl_getx -* "TabControl#get_y":#TabControl_gety -* "TabControl#hit_test":#TabControl_hittest -* "TabControl#on_draw":#TabControl_ondraw -* "TabControl#set_col_position":#TabControl_setcolposit...
2007 Mar 22
0
[911] trunk/wxsugar/lib/wx_sugar/wx_classes: Added default? method for size and position
...p&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-03-22 09:26:31 UTC (rev 911) </span><span class="lines">@@ -0,0 +1,7 @@ </span><ins>+class Wx::Size + # Checks if this equal to Wx::DEFAULT_SIZE (i.e. no explicit + # dimensions set) + def default? + get_width == -1 and get_height == -1 + end +end </ins></span></pre> </div> </div> </body> </html>
2007 Aug 02
0
2 commits - libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_stage_as.c
...user */ gint stage_height; /* height set by the user */ guint align_flags; /* SwfdecAlignFlag */ diff --git a/libswfdec/swfdec_stage_as.c b/libswfdec/swfdec_stage_as.c index 85fc9ea..2f27cbb 100644 --- a/libswfdec/swfdec_stage_as.c +++ b/libswfdec/swfdec_stage_as.c @@ -134,11 +134,7 @@ get_width (SwfdecAsContext *cx, SwfdecAs { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - if (player->stage_width > -1) { - SWFDEC_AS_VALUE_SET_INT (ret, player->stage_width); - } else { - SWFDEC_AS_VALUE_SET_INT (ret, player->width); - } + SWFDEC_AS_VALUE_SET_INT (ret, player->i...
2008 Aug 24
2
Missing ids in documentation
..._dashes</h3> pen.html:<h3 class="Pen_getjoin">Pen#get_join</h3> pen.html:<h3 class="Pen_getstipple">Pen#get_stipple</h3> pen.html:<h3 class="Pen_getstyle">Pen#get_style</h3> pen.html:<h3 class="Pen_getwidth">Pen#get_width</h3> pen.html:<h3 class="Pen_isok">Pen#is_ok</h3> pen.html:<h3 class="Pen_setcap">Pen#set_cap</h3> pen.html:<h3 class="Pen_setcolour">Pen#set_colour</h3> pen.html:<h3 class="Pen_setdashes">Pen#set_dashes</h3&...
2004 Apr 21
2
Resizing a ListCtrl
Hi Guys, I''m having serious troubles resizing a dialog with a ListCtrl. The ctrl will not resize horizontally no matter what I''m doing. I''ve attached a sample code below. Any help will be greatly appreciated, as I really like wxRuby :) I''ve also tried to copy from the example from listtest.rbw, but that also doesn''t seem to work. Another thing
2006 Nov 24
0
[755] trunk/wxruby2/lib/wx/classes: Nicer more meaningful string representations of objects; hide Wxruby2
...(rev 0) +++ trunk/wxruby2/lib/wx/classes/size.rb&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2006-11-24 16:29:08 UTC (rev 755) </span><span class="lines">@@ -0,0 +1,5 @@ </span><ins>+class Wx::Size + def to_s + "#<Wx::Size: (#{get_width}, #{get_height})>" + end +end </ins></span></pre> </div> </div> </body> </html>
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
2007 Jul 26
0
6 commits - libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_stage_as.c test/trace
...ge_as.c b/libswfdec/swfdec_stage_as.c index eee9a6b..85fc9ea 100644 --- a/libswfdec/swfdec_stage_as.c +++ b/libswfdec/swfdec_stage_as.c @@ -126,3 +126,47 @@ set_align (SwfdecAsContext *cx, SwfdecAs g_object_notify (G_OBJECT (player), "alignment"); } } + +SWFDEC_AS_NATIVE (666, 5, get_width) +void +get_width (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecPlayer *player = SWFDEC_PLAYER (cx); + + if (player->stage_width > -1) { + SWFDEC_AS_VALUE_SET_INT (ret, player->stage_width); + } else { + SWFDEC_A...
2012 Aug 17
0
Wine release 1.5.11
...iface calls. shlwapi: Use proper helpers for iface calls. comdlg32: Use proper helpers for iface calls. mshtml: Moved Invoke(DISPID_ENABLED) invocation to separated function. mshtml: Added IHTMLObjectElement::put_width implementation. mshtml: Added IHTMLObjectElement::get_width implementation. mshtml: Added IHTMLObjectElement::put_height implementation. mshtml: Added IHTMLObjectElement::get_height implementation. mshtml: Added more IHTMLObjectElement tests. Jan Beich (2): ntdll: Prefer a portable function to get thread id. ntdll: Fetch threa...
2012 Mar 30
0
Wine release 1.5.1
...get_domain implementation. mshtml: Use proper helpers to implement IHTMLSyle::fontSize property. mshtml: Use proper helpers in IHTMLStyle::color implementation. mshtml: Use proper helpers in IHTMLStyle::backgroundColor implementation. mshtml: Use better helper in IHTMLStyle::get_width implementation. J?zef Kucia (7): dinput8/tests: Use CLSCTX_INPROC_SERVER instead of a magic number. d3dx9/tests: Test the DDS support in the D3DXGetImageInfo functions. d3dx9: Forward D3DXCreateCubeTextureFromFileInMemory to D3DXCreateCubeTextureFromFileInMemoryEx. d3dx9: A...
2009 Dec 04
0
Wine release 1.1.34
...se. wininet: Don't use INTERNET_SetLastError in HttpSendRequestW. shdocvw: Use CoTaskMemFree to free url. mshtml: Added IHTMLWindow2::get_screen implementation. mshtml.idl: Added DispHTMLScreen declaration and use it in HTMLScreen object. mshtml: Added IHTMLScreen::get_width implementation. mshtml: Added IHTMLScreen::get_height implementation. mshtml: Added IHTMLScreen::get_colorDepth implementation. mshtml: Forward setting window.location to window.location.href. mshtml: Added IHTMLElement2::get_readyState implementation. mshtml: Added IH...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...lags != player->align_flags) { - player->align_flags = flags; + if (flags != player->priv->align_flags) { + player->priv->align_flags = flags; g_object_notify (G_OBJECT (player), "alignment"); swfdec_player_update_scale (player); } @@ -136,7 +137,7 @@ get_width (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - SWFDEC_AS_VALUE_SET_INT (ret, player->internal_width); + SWFDEC_AS_VALUE_SET_INT (ret, player->priv->internal_width); } SWFDEC_AS_NATIVE (666, 7, get_height) @@ -146,7 +147,7 @@ get_hei...