Rotating an image, omg I cant !!!
|
01-03-2013, 01:11 AM
Post: #1
|
|||
|
|||
Rotating an image, omg I cant !!!
Please people help me to rotate a simple image. I´m using Delphi.
My code is working. In my form i have one TVLDSImageDisplay and one TLVRotate. I dont know how to rotate the image after display. Inside the "TLVRotate.InpuPin" property, there is nothing to select. This is my code: Code: procedure TForm1.Button1Click(Sender: TObject); Pleaseeeeee !!! thanks. |
|||
01-03-2013, 01:26 AM
Post: #2
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Hi! After setting the angle try the VLRotate ProcessBitmap method.
Regards, Dave |
|||
01-03-2013, 01:47 AM
Post: #3
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Dave, it works...
But after set the angle value the image do not rotate over the center ! Take a look please. http://s9.postimage.org/lwf1m5s33/knob_Img1.jpg http://s9.postimage.org/4kep0pylr/knob_Img2.jpg http://s9.postimage.org/uh8ddc29b/knob_Img3.jpg thanks. |
|||
01-03-2013, 05:10 AM
Post: #4
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Check the VLRotate.RotateOffset.Mode, make sure it's set to cmCenter.
Regards, Dave |
|||
01-03-2013, 06:46 AM
(This post was last modified: 01-03-2013 06:50 AM by oliveiracarlos.)
Post: #5
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Thanks for reply Dave.
But yes, its cmCenter. No matter what I do, I cant center the button. If you have some time to help, appreciate that: https://docs.google.com/open?id=0B-WCIyM...lI4dDlBdWc (Its a Delphi XE project) all the code is as following... Code: unit uKnobButton; Code: object Form1: TForm1 thanks in advanced. |
|||
01-03-2013, 10:54 AM
Post: #6
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Try this:
procedure TForm1.TrackBar1Change(Sender: TObject); begin VLRotate1.Angle := TrackBar1.Position; VLRotate1.ProcessBitmap(img,img); VLDSImageDisplay1.DisplayBitmap(img); You'd probably want to re-assign the original image to img once you did this. If it still fails i can have a look at the project tommorow. Is the original image 121x121 btw? Regards, Dave |
|||
01-04-2013, 05:28 AM
Post: #7
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Sorry Dave, but it doesnt work...
Adding this last line the image flicks a lot and still not rotating in center. Yes the image has 121x121. :/// thanks for your help. |
|||
01-04-2013, 09:16 AM
Post: #8
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Try Image2.Center=true;
Regards, Dave |
|||
01-05-2013, 04:31 AM
Post: #9
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
Simple and perfect solutions, thanks a lot mr Dave.
|
|||
01-05-2013, 06:07 AM
Post: #10
|
|||
|
|||
RE: Rotating an image, omg I cant !!!
You're welcome
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)