Example image:
ExampleCode:
Uses gdiplus; Procedure injection (Sender: tobject); var graphics: igpgraphics; Image: igpimage; brush: igptexturebrush; rect: tgprect; begin chdir ('C: \ gdiplusimg \'); image: = tgpimage.create('houseandtree.gif '); brush: = tgptexturebrush. create (image); graphics: = tgpgraphics. create (handle); rect. initialize (image. width, image. height, image. width * 2, image. height * 2); graphics. clear ($ ffffffff); graphics. drawimage (image, 0, 0, image. width, image. height); // brush. wrapmode: = wrapmodetile; // The default graphics. fillrectangle (brush, rect); brush. wrapmode: = wrapmodetileflipx; graphics. translatetransform (0, rect. Y + rect. height); graphics. fillrectangle (brush, rect); brush. wrapmode: = wrapmodetileflipy; graphics. translatetransform (rect. X + rect. width,-graphics. transform. offsety); graphics. fillrectangle (brush, rect); brush. wrapmode: = wrapmodetileflipxy; graphics. translatetransform (0, rect. Y + rect. height); graphics. fillrectangle (brush, rect); end;