search for: draw_lin

Displaying 20 results from an estimated 22 matches for "draw_lin".

Did you mean: draw_line
2008 Jan 12
1
GraphicsContext demo
...ch now includes a GraphicsContext demo, just in time for a release. *wipes forehead* So far, it''s looking pretty good. BTW Alex, another bug came up while working with GraphicsContext, but wasn''t something as major that could prevent me from completing the demo. GraphicsContext#draw_lines(size_t n, Point2Double points, Integer fillStyle) Need another typemap wrapper for Point2Double. And I''m thinking that it should be an 2d array of sorts. Points represented by [x,y], and array of them, EG: [ [first_x,first_y], [second_x,second_y], [third_x,third_y], ....etc......
2008 Jan 02
3
how can I use draw line in wxruby??
I use dc = DC.new() dc.draw_line(50, 50, 100, 100) but it can''t be compiled I don''t know how to declare DC variable?? in http://wxruby.rubyforge.org/doc/dc.html it don''t tell me how to declare now variable plese tell me :''( -- Posted via http://www.ruby-forum.com/.
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.
...UnitsFactor = (ppiPrinterX/(scale*25.4)) - logUnits = (50*logUnitsFactor) </del><ins>+ log_units_factor = (ppi_printer_x/(scale*25.4)) + log_units = (50*log_units_factor) </ins><span class="cx"> dc.set_pen(Wx::BLACK_PEN) </span><del>- dc.draw_line(50, 250, (50.0 + logUnits).to_i, 250) - dc.draw_line(50, 250, 50, (250.0 + logUnits).to_i) </del><ins>+ dc.draw_line(50, 250, (50.0 + log_units).to_i, 250) + dc.draw_line(50, 250, 50, (250.0 + log_units).to_i) </ins><span class="cx"> </span><spa...
2007 Oct 11
0
10 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_buffer.c libswfdec/swfdec_movie_as_drawing.c test/image test/sound
...fdecMovie *movie, SwfdecDraw *new) +{ + /* FIXME: need to cairo_close_path()? */ + movie->draw_fill = new; + if (new == NULL) + return; + + movie->draws = g_slist_append (movie->draws, new); + + /* need to begin a new line segment to ensure proper stacking order */ + if (movie->draw_line) { + movie->draw_line = swfdec_stroke_copy (movie->draw_line); + movie->draws = g_slist_append (movie->draws, movie->draw_line); + } +} + SWFDEC_AS_NATIVE (901, 1, swfdec_sprite_movie_beginFill) void swfdec_sprite_movie_beginFill (SwfdecAsContext *cx, SwfdecAsObject *objec...
2007 Dec 30
4
Drawing thread not getting enough time from scheduler?
...d #Draw lines. 30.times do |j| x = i + j buffer.draw do |surface| surface.pen = Wx::Pen.new( Wx::Colour.new(128, 255, 128), 3 ) surface.pen.cap = Wx::CAP_ROUND surface.draw_line(x, 0, x+100, 100) end end #Update screen. update_window(window, buffer) end end end def update_window(window, buffer) window.paint do |dc| #Copy the buffer to the viewable window. dc.draw_bitmap(buffer, 0, 0, f...
2007 Oct 02
0
[ wxruby-Patches-14375 ] bigdemo/wxScrolledWindow - paint bug with scrolled window
...curLine = [] capture_mouse() @drawing = true end end ---- And in on_left_button_event_motion From: paint do | dc | dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN", 4, Wx::SOLID)) coords = [@x, @y] + convert_event_coords(event) @curLine.push(coords) coords.flatten!() dc.draw_line(coords[0], coords[1], coords[2], coords[3]) set_XY(event) end To: paint do | dc | dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN", 4, Wx::SOLID)) save_coords = [@x, @y] + convert_event_coords(event) # translate the absolute coords to save them in the array coords = [@ev...
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
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
2007 Mar 06
0
[876] trunk/wxruby2/samples/printing/printing.rb: Fix a crasher if scale = 0; fix variable rename
..."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_logical, (top_margin_logical+yExtent).to_i ) </del><ins>+ dc.draw_line( left_margin_logical, (top_margin_logical + y_extent).to_i, + right_margin_logical, (top_margin_logical +...
2006 Aug 24
4
typemap.i patch
This patch adds %directorout typemaps for the GetTextExtent functions _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2008 Jan 19
5
No joy from Wx::App.dispatch, Wx::App.yield...
...#Clear screen. surface.pen = black_pen surface.brush = Wx::BLACK_BRUSH surface.draw_rectangle(0, 0, 300, 300) #Draw lines. surface.pen = green_pen surface.pen.cap = Wx::CAP_ROUND 30000.times do |j| x = @i + j surface.draw_line(x, 0, x+100, 100) end end #Update screen. update_window(window, buffer) @i += 1 @i = 0 if @i > 300 end def update_window(window, buffer) window.paint do |dc| #Copy the buffer to the viewable window. dc.draw_bitmap(buffer, 0, 0...
2007 Dec 01
5
Tearing in my buffered animation test script...
...surface.brush = Wx::BLACK_BRUSH surface.draw_rectangle(0, 0, 300, 300) end #Draw line. buffer.draw do |surface| surface.pen = Wx::Pen.new( Wx::Colour.new(128, 255, 128), 3 ) surface.pen.cap = Wx::CAP_ROUND surface.draw_line(i, 0, i+100, 100) end #Update screen. window.refresh window.update sleep 0.1 end end end app = MyApp.new app.main_loop
2007 Oct 04
1
wxRuby: MemoryDC problems...
...ing to a Wx::Bitmap first, then using Wx::DC#draw_bitmap to copy it to a Wx::Window. But I get the following error: C:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.1-i386-mswin32/lib/wx/classes/bitmap.rb:18:in `draw'': uninitialized constant Wxruby2::Bitmap::MemoryDC (NameError) from dc_draw_line.rb:30:in `on_init'' ... What am I doing wrong? Is MemoryDC not implemented yet in WxRuby 1.9.1? It''s in the documentation, but I know large chunks of that are auto-generated... My code is below. Any advice would be most appreciated! -Jay gems_loaded = false begin...
2006 Sep 27
4
wxScrolledWindow.rbw
This patch removes the call to ''free'' from the sample. Roy _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2007 Apr 28
0
[976] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Remove deprecated begin_drawing and end_drawing calls
...="cx"> coords = [@x, @y] + convert_event_coords(event) </span><span class="cx"> @curLine.push(coords) </span><span class="cx"> coords.flatten!() </span><span class="cx"> dc.draw_line(coords[0], coords[1], coords[2], coords[3]) </span><span class="cx"> set_XY(event) </span><del>- dc.end_drawing() </del><span class="cx"> end </span><span class="cx"> end </span>&...
2007 Apr 29
0
[993] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Use ClientDC via Window#paint object
...="cx"> coords = [@x, @y] + convert_event_coords(event) </span><span class="cx"> @curLine.push(coords) </span><span class="cx"> coords.flatten!() </span><span class="cx"> dc.draw_line(coords[0], coords[1], coords[2], coords[3]) </span><span class="cx"> set_XY(event) </span><ins>+ end </ins><span class="cx"> end </span><span class="cx"> end </span><span class=&...
2007 Dec 10
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_color_as.c libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_as_drawing.c
...ate on children */ SWFDEC_MOVIE_INVALID_EXTENTS, /* recalculate extents */ - SWFDEC_MOVIE_INVALID_CONTENTS, /* trigger an invalidation */ SWFDEC_MOVIE_INVALID_MATRIX /* matrix is invalid, recalculate */ } SwfdecMovieCacheState; @@ -136,6 +135,10 @@ struct _SwfdecMovie { SwfdecDraw * draw_line; /* current line style or NULL */ int draw_x; /* current x position for drawing */ int draw_y; /* current y position for drawing */ + + /* invalidatation state */ + gboolean invalidate_last; /* TRUE if this movie's previous contents are already invalidated */ + gbool...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...ef on_paint + paint do | dc | + size = get_client_size + + dc.set_font Wx::NORMAL_FONT + dc.set_brush Wx::WHITE_BRUSH + dc.set_pen Wx::WHITE_PEN + dc.draw_rectangle(0, 0, size.x, size.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...
2007 Nov 12
0
20 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_string.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player_as.c
...-- a/libswfdec/swfdec_movie_as_drawing.c +++ b/libswfdec/swfdec_movie_as_drawing.c @@ -203,7 +203,7 @@ swfdec_sprite_movie_lineStyle (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|iii", &width, &color, &alpha); movie->draw_line = NULL; - if (argc < 1 && SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) return; if (argc < 3) alpha = 100; commit 4224157c1615e3a496f652a64dfa4fb5c994cbab Author: Pekka Lampila <pekka.lampila at iki.fi...