|
|
|
date: Sat, 28 Jun 2008 12:17:28 +0200,
group: microsoft.public.win32.programmer.ui
back
Re: GDI functions and scaling - Can't get it to work .... W98 <-> XP differences ?
Hello all,
I'm trying to scale stuff that GDI32.DLL can draw, and have troubles with
it.
I've tried many combinations, but was, on a W98se machine, not able to get
it to work. However, while working on a XP machine I got something that
seemed to work as intended :
call SetMapMode,[@@hDC],MM_ANISOTROPIC
call SetWindowExtEx,[@@hDC], 640*2000, 480*2000, 0
call SetViewportExtEx,[@@hDC], 640,480,0
However, when I executed the same code on the W98se machine it looked like
it was fully ignored. Instead of a drawing consisting of lines and small
circles in a very recognisable pattern, all I got is a jumble of large
circles and disconnected lines.
My question : Although MSDN does not mention it (and seems to say that the
above functions are available in all Windows versions) is there something I
forgot to do ?
Another thing: when I defined the viewport as above, but set the window to
full-screen ( 1280x1024) a rectangle that was drawn for m 0,0 to the maximal
possible coordinates extended to well beyond the viewports boundaries. Did
I mis-understand the function ?
Regards,
Rudy Wieser
date: Sat, 28 Jun 2008 12:17:28 +0200
author: R.Wieser lable
Re: GDI functions and scaling - Can't get it to work .... W98 <-> XP differences ?
No wonder - Win9x/ME only allow 16 bit coordinates, while you define
480*2000, which is far too large for WinToy.
Re your clipping problem: Windows does not clip to Viewport
coordinates, it just uses them for scaling. Clipping you have to do
yourself (usually using the clipping API)
Christian
> call SetMapMode,[@@hDC],MM_ANISOTROPIC
> call SetWindowExtEx,[@@hDC], 640*2000, 480*2000, 0
> call SetViewportExtEx,[@@hDC], 640,480,0
>
> However, when I executed the same code on the W98se machine it
> looked like
> it was fully ignored.
date: Tue, 1 Jul 2008 10:41:38 +0200
author: Christian Kaiser
Re: GDI functions and scaling - Can't get it to work .... W98 <-> XP differences ?
Hello Christian,
> No wonder - Win9x/ME only allow 16 bit coordinates, while you
> define 480*2000, which is far too large for WinToy.
That was what I was starting to assume, but as I could not find *any*
reference about it on MSDN I was not at all sure.
By the way : XP does not use 32 bits either, just 27 or so.
> Re your clipping problem: Windows does not clip to
> Viewport coordinates, it just uses them for scaling.
Another thing I was starting to assume. "Funny" that even MSDN does (again)
not mention it.
> Clipping you have to do yourself (usually using the
> clipping API)
*The* clipping API ? Can't say I've ever seen it ...
Thanks for your reply.
Rudy Wieser
Christian Kaiser schreef in berichtnieuws
uFuzIZ12IHA.4588@TK2MSFTNGP03.phx.gbl...
> No wonder - Win9x/ME only allow 16 bit coordinates, while you define
> 480*2000, which is far too large for WinToy.
>
> Re your clipping problem: Windows does not clip to Viewport
> coordinates, it just uses them for scaling. Clipping you have to do
> yourself (usually using the clipping API)
>
> Christian
>
> > call SetMapMode,[@@hDC],MM_ANISOTROPIC
> > call SetWindowExtEx,[@@hDC], 640*2000, 480*2000, 0
> > call SetViewportExtEx,[@@hDC], 640,480,0
> >
> > However, when I executed the same code on the W98se machine it
> > looked like
> > it was fully ignored.
date: Tue, 1 Jul 2008 16:28:47 +0200
author: R.Wieser lable
|
|