Re: understanding ImpForceLineAngle, aGeo and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Replying to my own mail)
I'm still following this through - I think I'm going to
end up following it through to what it actually reads when
it draws the line.
In the case of my vertical line, SdrPathObj::NbcResize calls
SdrTextObj::NbcResize and that completely rebuilds the
rotation angle and aGeo.
Still, the maPathPolygon looked OK afterwards so...hmm
I'll keep digging.

I'd expected the maPathPolygon to be the important bit;
(Pointers to the code that actually draws the line would
be appreciated).

Dave

Some of my random debug:

SdrPathObj::ImpForceKind  this=0x513e4c0 meKind in:2
SdrPathObj::ImpForceKind mod meKind: 2 bClosed: 0
SdrPathObj::ImpForceLineAngle: aPoint0,1: 560,1315,560,5940 aDelt: 0,4625 orig Rot: 31500 Shear: 0 sin/Cos:-0.707107/0.707107 maRect: 57x57@(0,0)
SdrPathObj::ImpForceLineAngle: new Rot: -9000 Shear: 0 sin/Cos:-1/2.83277e-16 maRect: 0x4625@(560,1315)
SSPP:setPVI PP: [1:<2:(560.126,1315.28)--(560.126,5940.28)>]
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextAutoGrowHeight'  nWID: 1069=<Any: (boolean) 0>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextLeftDistance'  nWID: 1071=<Any: (long) 250>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextLowerDistance'  nWID: 1074=<Any: (long) 125>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextRightDistance'  nWID: 1072=<Any: (long) 250>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextUpperDistance'  nWID: 1073=<Any: (long) 125>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextVerticalAdjust'  nWID: 1075=<Any: (com.sun.star.drawing.TextVerticalAdjust) 0>
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'TextWordWrap'  nWID: 1091=<Any: (boolean) 1>
createAndInsert applying props rot case: mnRotation:0 at 1276
createAndInsert applying props rot case: mnRotation:0 at 1288
SvxShapePolyPolygon::getPropertyValueImpl this:0x5115fd0 'InteropGrabBag' nWID: 3991
SvxShapePolyPolygon::setPropertyValueImpl this:0x5115fd0 'InteropGrabBag'  nWID: 3991=<Any: ([]com.sun.star.beans.PropertyValue) len 5>
createAndInsert applying props rot case: mnRotation:0 at 1311
createAndInsert applying props rot case: mnRotation:0 at 1354
createAndInsert applying props rot case: mnRotation:0 at 1435
createAndInsert LineShape wps special position: 988,2320
createAndInsert applying props rot case: mnRotation:0 at 1444
createAndInsert applying props rot case: mnRotation:0 at 1511
createAndInsert rotation bit: bUseRotT1 mnRot0 nCameraRotation: 0
createAndInsert applying props rot case: mnRotation:0 at 1597
createAndInsert applying props rot case: mnRotation:0 at 1601
SvxShapePolyPolygon::getPropertyValueImpl this:0x5115fd0 'InteropGrabBag' nWID: 3991
Props_name: Shape5
SdrPathObj::NbcResize fResizeX: 1 Y: 1.00022
SdrPathObj::NbcResize transform: [1 0 0; 0 1.00022 -0.284324; 0 0 1]
SdrPathObj::NbcResize pre-polys: [1:<2:(560.126,1315.28)--(560.126,5940.28)>]
SdrPathObj::NbcResize post-transform-polys: [1:<2:(560.126,1315.28)--(560.126,5941.28)>]
SdrTextObj::NbcResize nShearAngle: 0 nRotatationAngle: -9000 bRotate90: 1 bNotSheared: 1 bMirr X/Y:0,0
SdrTextObj::NbcResize (b) maRect in: 0x4625@(560,1315) nRotationAngle: -9000
SdrTextObj::NbcResize (b) maRect out: 0x0@(560,1315) nRotationAngle: 0
SdrTextObj::NbcResize (c) bRota90: 1 nRotationAngle: 0


* Dr. David Alan Gilbert (dave@xxxxxxxxxxx) wrote:
> * Regina Henschel (rb.henschel@xxxxxxxxxxx) wrote:
> > Hi David,
> 
> Hi Regina,
>   Thanks for the reply,
> 
> > Dr. David Alan Gilbert schrieb am 02.01.2021 um 04:35:
> > > Hi,
> > >    I'd appreciate some pointers on shape creation and in
> > > particular why ImpForceLineAngle exists.
> > 
> > ImpForceLineAngle() exists from the beginning. I see it already in OOo1.1.5.
> > You will find it as ImpForceLineWink() in the history of svdopath.cxx.
> 
> Yep, learnt another word of German :-)
> 
> > [..]
> > >    a) What is ImpForceLineAngle for, why calculate an angle
> > > from the line you've just created? >    b) Is that angle supposed to be applied to that line - or
> > > is it intended just for something else ?
> > 
> > The purpose is, that the user gets a simple way to have text along the line.
> > Without this rotation, the text would always be horizontal, although the
> > user creates a non horizontal line.
> 
> Yep, that bit makes sense.
> 
> > I think, at some point between OOo2.4 and OOo3.2.1 this rotation was
> > extended to polylines.
> 
> I think this is the bit that's confusing here; most lines get loaded 
> OK, but for some reason this one is different (and possibly only in Writer);
> you'd think if you were going to build a line out of two points stating
> where you want them, then you wouldn't expect it to get rotated
> (If it always did it, wouldn't all lines end up horizontal).
> 
> > The member aGeo contains the transformation angles. When you apply this
> > shear and rotation to the left/top corner of the logic rectangle (member
> > maRect) you get the snap rectangle (member maSnapRect). These angles are
> > part of the API. You need to know, that vertical flip introduces an
> > additional 180° rotation.
> 
> OK.
> 
> > Custom shapes are special in that they have properties mirror vertical and
> > mirror horizontal in their enhanced geometry, that SdrObjCustomShape has the
> > true rotation angle as member fObjectRotation, and that they allow text
> > rotation independent from object rotation in their enhanced geometry.
> 
> Is there anything I should be reading about this?
> 
> Dave
> 
> > Kind regards
> > Regina
> > 
> > _______________________________________________
> > LibreOffice mailing list
> > LibreOffice@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/libreoffice
> -- 
>  -----Open up your eyes, open up your mind, open up your code -------   
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux