Results 1 to 3 of 3

Thread: WINAPI Polygons - I need help

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    1

    WINAPI Polygons - I need help

    I am currently in the middle of programming a game engine. I have attempted to use the CreatePolygonRgn and PtInRegion for doing boundary detetion and simulating z-order when I draw multiple images onto screen using BitBlt. As far I can tell the polygons are being created and I know all the points specififed are correct, but it never returns the correct value when I specify a point in the region to be tested. I would also like to know if all values are to be specified in TWIPS or Pixels. I am using TWIP vaules right now because I used Pixels to no avail. Any help would be appreciated.

    Vince

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    I'm not sure about how to properly use PtInRegion as I've never worked with regions myself (I think I might now just for the hell of it), but as far as I know, graphical APIs always operate with pixels as the given measurement. Maybe there is an oddity in how it treats pixels on the edges or something. I know that for RECT structures, a point on the left or top edge is considered in the rect, but for the bottom and right edge it's not.
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  3. #3
    Maexchen
    Guest

    answer

    all api- calls from the gdi works with pixel not with twips

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width