Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cut Polygon and Blit To New Object

10 views
Skip to first unread message

wxforecaster

unread,
Sep 29, 2009, 8:41:28 PM9/29/09
to
Hopefully I can make some sense of what I'm trying to do.

I have an existing GDI object that contains an image.
While I've worked extensively with using BitBlt and StretchBlt for
rectangular regions, I would like to cut out an arbitrary polygon
shape from that image (a triangle for example), and then map those
coordinates to a set of coodinates in another GDI object. The
resultant polygon may be stretched (bigger/smaller), but will not be
rotated in any way.

Basically I would like to copy the region defined by the polygon
(x1,y1....xn,yn) and blit that polygon to another GDI object at
coordinates (a1,b1....an,bn) where x1,y1 is mapped to a1,b1, and so on
and so forth.

Evan

Nobody

unread,
Sep 30, 2009, 7:51:54 PM9/30/09
to
"wxforecaster" <ebook...@kc.rr.com> wrote in message
news:19696a86-d8f3-4e87...@f16g2000yqm.googlegroups.com...

My guess is that PlgBlt() does what you want, but I am not sure.

http://en.wikipedia.org/wiki/Parallelogram


Nobody

unread,
Sep 30, 2009, 7:56:37 PM9/30/09
to
"Nobody" <nob...@nobody.com> wrote in message
news:%23En6Aki...@TK2MSFTNGP02.phx.gbl...

> My guess is that PlgBlt() does what you want, but I am not sure.
>
> http://en.wikipedia.org/wiki/Parallelogram

After some checking, MaskBlt is preferable. There is no StretchMaskBlt, so
you have to use StretchBlt first, then MaskBlt.


0 new messages