Version 16 (modified by mira, 16 years ago) (diff) |
---|
Analysis
Overview
Frames coordinates are calculated in relation to the upper left angle of the page which has coordinates (0,0). In default mode the frames position is the position of its contents upper left point, however a frame should be able to set and get its position in all modes(including borders, margins, etc.) and for different special points (middle, right angle, etc). A rotation will be kept in the model only by the angle, so the position should change when rotating also. Frames could overlap and/or not fit into the page. Even when some frames or frame parts are outside the page`s range they are still a part of the working area and should be seen in author mode. They however should be clipped out in reader mode so that the reader stays unaware of them.
Task requirements
- The frame should have only properties defining its position (x, y for example) in default mode.
- A frame should have get and set methods for position in all modes and for all special points.
Task result
The result of this task is source code.
Implementation idea
- Add position() property to the Frame for the default coordinates.
- Add methods with mode and special point arguments for setting and getting this position.
Related
- trunk/sophie2-platform/doc/spec-diagrams/FrameBounds.png
- FRAME_PADDING_R0
- FRAME_MARGINS_R0
- FRAME_INSETS_R0
- FRAME_BOUNDS_R0
- FRAME_SIZE_R0
How to demo
- Create frame with concrete coordinates and check if they are correct.
- Change the frames coordinates in different modes and relative to different points and check that its position is updated correctly.
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
(Write comments for this or later revisions here.)