[PD] [gem] how to fit a rectangle into gem-window infullscreen-mode
reduzierer at yahoo.de
Sat Aug 20 00:38:55 CEST 2005
IOhannes m zmoelnig wrote:
> Roman Haefeli wrote:
> > hi
> > i'd like to show some images in fullscreen-mode with
> > gem. since it is cheaper to use [pix_texture] than to
> > draw the image directly, i draw a rectangle that fits
> > exactly in the gem-window and apply the image as a
> > texture.
> > i plan to create an application that will be used on
> > different machines with different displays. at the
> > moment i have to change the dimensions of the
> > [rectangle] manually when i use the patch on a machine
> > with different display-resolution.
> no you don't!
> > i think there is a relation between the used
> > resolution and x- and y-values of [rectangle], but i
> > failed finding it. is there a way to calculate these
> > values from the resolution in order to fit the
> > [reactangle] exactly into the gem-window? this would
> > allow to write the actual resolution in a config-file
> > whitout the need of changing the patch.
> the only problematic thing that can happen to you is when your
> aspect-ratio changes.
> a rectangle that covers the full-screen on 500x500 will not cover the
> entire screen on 800x600;
> however: the same rectangle that covers 1024x768 will also cover a
> 1600x1200 screen (or a 320x240 window)
> note: the height of the gemwindow will always be 4 units (the width
> change with the aspect-ratio)
thanks. i hoped it would be that easy to handle.
> note: you will probably want to keep the aspect-ratio in order to not
> distort your images)
yes, i know. the images do always have the resolution (and, of course,
the aspect-ratio) of the used screen, so this won't be a problem.
by the way: if i fit the rectangle exactly into the window and the image
has the same resolution as the screen, are there any interpolation
> PS: if you find that i am talking non-sense, then you are likely to
> discovered a bug
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
More information about the Pd-list