Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1448

Demo: Fill GDI+ path with scaled texture image

$
0
0
I had a need for this and noticed that there isn't much information about how to fill a GDI+ path with an image which is scaled or stretched to fit said path. Plenty of simple ways to fill a path with a texture either tiled or clamped but next to none that I could find which show how to scale & transform. So I wrote this. The demo shows how to do so with a transformation matrix, and also a second and simplified method which I believe creates, uses, and disposes of the matrix behind the scenes. Since the first method exposes the matrix, it is more versatile in that other custom transformations can be applied if needed.

Also shows how to create and add a few simple shapes.

Project is heavily commented so one can see what is happening.

Hope this is of use to someone else :).
Attached Files

Viewing all articles
Browse latest Browse all 1448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>