|
-
Jan 11th, 2012, 04:36 PM
#16
Re: [VB6] - DIB's - Tiles an image
Here's some problems with your code:
1 picGraphicsEffects.Picture.Height & Width measurements are in himetrics. All VB pictures are.
2 picGraphicsEffects.Width will be in Twips since you set it to UserControl.Width. Usercontrol's Width & Height are always in twips, just like a a form's: Me.Width or Me.Height
3 Use ScaleX & ScaleY to convert himetrics to pixels or twips as needed. See my code for example
4 Do not use picGraphicsEffects.Picture = picGraphicsEffects.Image inside your loop. You will slow it down considerably since a new bitmap is created each time.
Might want to reconsider using my tiling routine. I don't think you will get anything faster than that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|