Board index » Visual Studio » Polygon bitmap fill

Polygon bitmap fill

Visual Studio322
Hello



GDI PolyPolygon method with pattern brush (character 'a' from 8x8 bitmap)

will fill polygons this way:



|---------------------|

| |

|aaaaaaaaaaaaaaaaaa|

| |-----------------------|

|aaaaaaaaaaaaaaaaaa|aaaaaaaaaaaaaaaaaaa|

| | |

|---------------------|aaaaaaaaaaaaaaaaaaa|

| |

|----------------------|



How to fill these polygons this way (each poly individual) ?



|---------------------|

| |

|aaaaaaaaaaaaaaaaaa|

| |-----------------------|

|aaaaaaaaaaaaaaaaaa| |

| |aaaaaaaaaaaaaaaaaaa|

|--------------------| |

|aaaaaaaaaaaaaaaaaaa|

|-----------------------|



Thanks in advance

Piotr


-
 

Re:Polygon bitmap fill

Quote
GDI PolyPolygon method with pattern brush (character 'a' from 8x8 bitmap)

will fill polygons this way:

<snip>

How to fill these polygons this way (each poly individual) ?

<snip>



PolyPolygon() will just draw all the polygons using the currently selected brush with the brush origin of the DC when it's called,

to set a different brush origin for each polygon you'd need to separate those into individual Polygon() calls and call

SetBrushOrgEx() in-between each one using the bounding area of the polygons points to specify the brush origin in each case.

Hope this helps,



Mike





- Microsoft Visual Basic MVP -

E-Mail: EDais@mvps.org

WWW: www.mvps.org/EDais/





-