Re: Rubygame -- need help with zoom



is a 1pixel x 1pixel object fixed at that size, ignoring scale?
have you tried drawing a box or translating it?

/dc

On Sat, Aug 9, 2008 at 1:14 AM, Bryan Richardson <btrichardson@xxxxxxxxx> wrote:
Hello all,

I'm trying to get a Rubygame example to zoom, and can't seem to do so.
Right now, I'm simply drawing a single pixel at the center of the
screen, then trying to zoom when I press the space bar. I have my event
queue set up right, because if I tell it to print something when the
space bar is pressed it works. Here's how I'm trying to zoom:

@screen.zoom_to(@screen.w / 2, @screen.h / 2) if event.key ==
Rubygame::K_SPACE
@screen.update

Anyone know why this isn't working? The pixel at the center of the
screen stays the same size...

--
Thanks!
Bryan
--
Posted via http://www.ruby-forum.com/.



.



Relevant Pages

  • Rubygame -- need help with zoom
    ... I'm trying to get a Rubygame example to zoom, and can't seem to do so. ... I'm simply drawing a single pixel at the center of the ... then trying to zoom when I press the space bar. ...
    (comp.lang.ruby)
  • Re: ruler settings
    ... The page is centered in the drawing area ... You can zoom in to reduce the amount ... > Yes, vertical zero lines up with left bottom, and horizontal with upper ... >> Common Visio Questions http://www.mvps.org/visio/common_questions.htm ...
    (microsoft.public.visio.general)
  • Re: Horizontal ScrollBar+ PictureBox + Flickering (how to stop flickering?)
    ... When the user moves the scroll bar you just need to compare the start and end points of the "already drawn" data and compare it to the new required start and end points and blit the appropriate "already drawn" part into its new position and then clear the rest of the graph and draw the new data points. ... The total amount of blitting is the same of course, because with either method you need to blit the full width of the graph, but the number of lines you need to draw is less because you are drawing only the newly required lines. ... Personally when drawing graphs consiting of single pixel thickness lines I usually I opt for the simplicity of clearing the entire graph and drawing the entire new set of data on the grounds that drawing single pixel thickness lines is usually very fast. ...
    (microsoft.public.vb.general.discussion)
  • Re: Drawing 25 000 Shape fast
    ... Drawing every Shape, one by one, is too slow (panning the view ins't smooth). ... - pan (let's say that i'm at Zoom Factor 2000) ... the user want to map column 3 instead of column 4 for colors OR size of the shape OR type of shape ...
    (comp.lang.java.gui)
  • Re: Resize page and contents (drawing and printed pages)
    ... Is there an easier way to 'zoom out' the drawing to a desired size ... so that it will fit into one page on the plotter. ... cross-functional flow framework from the flow diagram contents. ...
    (microsoft.public.visio.general)