Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in .RotateFlip?
Message
From
18/02/2006 05:24:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
Bug in .RotateFlip?
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01097286
Message ID:
01097286
Views:
56
Hi, everyone

Yesterday I've ran across the problem whose repro code is shown below. In my own words, problem is I have the same bitmap loaded in multiple image controls. Depending on position on form, some of the bitmaps need to be rotated/flipped. However, when I rotate/flip an image, all of them are rotated/flipped, even though their .RotateFlip property does not change. Also, the BackStyle property is ignored - it looks like is set to 1, even it is definately set to 0.

I am aware VFP loads the image only once in memory and uses it to draw the image whenever it appears, however, I'd qualify this weird .RotateFlip behavior as a bug, because if I resize one of the images, the other one does not change. IOW, no matter what I do with one of the images, the others do not reflect the changes, unless I .RotateFlip it.

So, what do you think, guys? Does this qualifies for a bug report?

Here is the repro code. Run it, click the button, click outside the form, then click the button again.
Public oForm As MyForm
oForm = CreateObject("MyForm")
oForm.Show

Define Class MyForm As Form
	AutoCenter = .T.
	Caption = "Is this a bug or what?"
	Width = 200
	
	Add Object cmd As CommandButton With Height = 24, ;
		FontName = "Tahoma", FontSize = 8, ;
		Caption = "Click to flip first image", ;
		Width = 140, Top = 220, Left = 35
	
	Add Object img1 As Image With ;
		Picture = Home(4) + "Bitmaps\Gauge\Dome.bmp", ;
		BackStyle = 0, Top = 20, Left = 20
	
	Add Object img2 As Image With ;
		Picture = Home(4) + "Bitmaps\Gauge\Dome.bmp", ;
		BackStyle = 0, Top = 20, Left = 120
	
	Procedure cmd.Click
		ThisForm.Img1.RotateFlip = 2 && first rotates
		Wait Window "Second image's .RotateFlip property: " + Transform(ThisForm.Img2.RotateFlip)
		Wait Window "Second image's .BackStyle property: " + Transform(ThisForm.Img2.BackStyle)
		
	EndProc
EndDefine
Grigore Dolghin
Class Software.
Next
Reply
Map
View

Click here to load this message in the networking platform