Thanks Agnes !
Sergio,
You can also use the "RotateAt" function.
We have a sample that does this, but it rotates in the center, look for "transformations.scx" in the samples folder of GdiPlusX
BTW, the "RotateAt" function does internally exactly what Agnes has suggested, so, both solutions will provide EXACTLY the same results.
Asuming that the image to be rotated is "loImg", and its Graphics associated object is "loGfx":
LOCAL loMatrix AS xfcMatrix
LOCAL loPointF AS xfcPointF
WITH _SCREEN.System.Drawing
loMatrix = .Drawing2D.Matrix.New()
loPointF = .PointF.New(0, loImg.Height)
loMatrix.RotateAt(lnRotationAngle, loPointF)
loGfx.MultiplyTransform(loMatrix)
loGfx.DrawImage(loImg)
ENDWITH
Hope this helps
Cesar
>Hi Srdjan,
>
>hm, you have to move the point of rotation using TranslateTransform.
>Something like
>
>*... to the point of rotation
>*old Code
>*.oGfx.RotateTransform(Angle)
>*replaced by
>.oGfx.TranslateTransform(0,distance_top_to_bottom)
>.oGfx.RotateTransform(Angle)
>.oGfx.TranslateTransform(0,-distance_top_to_bottom)
>*/replaced by
>
>
>HTH
>
>Agnes
>>Dear All,
>>
>>I need to change
rotation point from top left corner to bottom left corner of rotated picture (or text) rectangle. Most of samples in GdiPlusX use topleft corner as 'nail' point. How do I set it to be bottom left or bottm right etc.
>>
>>TIA
>>Sergio