Class TurnScope
Turns everything drawn between a push and its pop about a point (Phase 181): the text of a turned shape, which Word draws at the shape's angle.
public sealed class TurnScope : ILayoutPrimitive
- Inheritance
-
TurnScope
- Implements
- Inherited Members
Remarks
A push names a centre and a clockwise angle; every primitive up to the matching pop is drawn as given and then turned about the centre by the angle. Coordinates inside are therefore the frame's before the turn: a glyph run, a clip, a rule or a LayoutLine inside says where it is in the upright frame, and the turn says where that frame is on the page. Pushes nest, the inner turn applied first; layout always pairs a push with a pop in the same paint band, and a clip pushed inside is popped inside.
A renderer that does not know this primitive draws the content upright, where it was drawn before Phase 181. DocWright's PDF renderer turns the content with the graphics state, so text stays text; its image renderer turns every primitive's geometry and rasterizes the glyphs turned.
Constructors
- TurnScope(Twips, Twips, int, bool)
Initializes a turn.
Fields
- FullTurn
The 60000ths of a degree in one turn.
Properties
- CenterX
Gets the x the content turns about.
- CenterY
Gets the y the content turns about.
- Push
Gets true when this begins a turn; false when it ends the innermost one.
- Rotation
Gets the clockwise angle in 60000ths of a degree.
Methods
- Map(double, double, out double, out double)
Maps a point of the upright frame onto the page: turned about the centre by the angle, as a renderer draws it.
- Pop()
Creates the end of a turn.
- Unmap(double, double, out double, out double)
Maps a point on the page back into the upright frame: the inverse of Map(double, double, out double, out double).