Re: [Xpert]X11 viewport stuff

2001-11-10 Thread Daniel Secrieru

>No, the origin is always the drawable origin.  The clip origin
> tells where the clipmask gets placed on the drawable.  You still need
> to translate coordinates if you don't want drawable relative rendering.
Even with XSetClipRectangles(...)?


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]X11 viewport stuff

2001-11-09 Thread Mark Vojkovich

On Sat, 10 Nov 2001, Daniel Secrieru wrote:

> >For the orgin, that's about all that can be done.  Clipping
> > to the extents could be done with the clipmask in the GC.
> You mean with XSetClipRectangles(...)? 

   Yes.  A single rect could be used to confine rendering to the viewport.

> (the origin of the GC could also
> be set in this way - the clip_x_origin/clip_y_origin in XGCValues, isn't
> it?)

   No, the origin is always the drawable origin.  The clip origin
tells where the clipmask gets placed on the drawable.  You still need
to translate coordinates if you don't want drawable relative rendering.


mark.

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]X11 viewport stuff

2001-11-09 Thread Daniel Secrieru

>For the orgin, that's about all that can be done.  Clipping
> to the extents could be done with the clipmask in the GC.
You mean with XSetClipRectangles(...)? (the origin of the GC could also
be set in this way - the clip_x_origin/clip_y_origin in XGCValues, isn't
it?)

Dany.



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]X11 viewport stuff

2001-11-09 Thread Mark Vojkovich

On Sat, 10 Nov 2001, Daniel Secrieru wrote:

> >I don't know what those Windows functions are suppossed to do.
> > All rendering in X is window-relative.  If that viewport function
> > lets you change that, there is no equivalent in X and you'll
> > have to do the viewport translation yourself.
> If it's not possible, how can this translation be done? (one way that
> I'm thinking is to keep some offsets and add them to the drawing
> coordinates; if they are 0, no changes to the origin are done, if not,
> everything that is to be drawn will be translated; it seems much complicated
> to set the viewport extents)

   For the orgin, that's about all that can be done.  Clipping
to the extents could be done with the clipmask in the GC.  


Mark.

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]X11 viewport stuff

2001-11-09 Thread Daniel Secrieru

SetViewportOrgEx:
The SetViewportOrgEx function sets the viewport origin of a device context
by using the specified coordinates.

SetViewportExtEx
The SetViewportExtEx function sets the horizontal and vertical extents of
the viewport for a device context by using the specified values.

SetWindowOrgEx
The SetWindowOrgEx function sets the window origin of the device context by
using the specified coordinates.

SetWindowExtEx
The SetWindowExtEx function sets the horizontal and vertical extents of the
window for a device context by using the specified values.


>I don't know what those Windows functions are suppossed to do.
> All rendering in X is window-relative.  If that viewport function
> lets you change that, there is no equivalent in X and you'll
> have to do the viewport translation yourself.
If it's not possible, how can this translation be done? (one way that
I'm thinking is to keep some offsets and add them to the drawing
coordinates; if they are 0, no changes to the origin are done, if not,
everything that is to be drawn will be translated; it seems much complicated
to set the viewport extents)

Dany.



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]X11 viewport stuff

2001-11-09 Thread Mark Vojkovich

On Sat, 10 Nov 2001, Daniel Secrieru wrote:

> How do I set in X11 the GC origin/extents and Window origin/extents, if
> at all possible?
> In Win32, the corespondent functions are:
> SetViewportOrgEx/SetViewportExtEx, for Win32 DC and
> SetWindowOrgEx/SetWindowExtEx for Win32 Window.

   I don't know what those Windows functions are suppossed to do.
All rendering in X is window-relative.  If that viewport function
lets you change that, there is no equivalent in X and you'll
have to do the viewport translation yourself.   Are the
window functions just the size and location of the window?
If so, see the man page on XConfigureWindow.


Mark.

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert