wiki:FRAME_BOUNDS_R0

Version 10 (modified by tanya, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=FRAME_BOUNDS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

The frame bounds are the frame size, position and Z order. There are 5 modes in which frame`s bounds could be calculated - Margins mode, Out-Border mode, Mid-Border mode, Padding mode (which is the same as In-Border mode) and Context mode. See trunk/sophie2-platform/doc/spec-diagrams/FrameBounds.png. Those modes determine the rectangular all coordinates are related to. The default mode is the Content mode. There are also 9 special points that could be observed when calculating frame coordinates - TOP_LEFT, TOP_MIDDLE, TOP_RIGHT, MIDDLE_LEFT, MIDDLE, MIDDLE_RIGHT,BOTTOM_LEFT, BOTTOM_MIDDLE, BOTTOM_RIGHT. The default one is the TOP_LEFT. For example in Padding mode and for TOP_RIGHT special point, the frames position is the position of the upper right point of the padding rectangular and the frame size is calculated including the paddings.

Task requirements

  • There should be representation of those modes and points.
  • There should be options for setting and getting the bounds in all modes and relating to all special points.

Task result

The result of this task is source code.

Implementation idea

  • Create needed enums representing the needed modes and points.

How to demo

  • Demonstrate calculating the bounds of a frame using different modes and points.

Design

  • Create enum Modes:

MARGINS, OUT_BORDER, MID_BORDER, IN_BORDER, CONTEXT;

  • Create enum SpecialPoints:

TOP_LEFT, TOP_MIDDLE, TOP_RIGHT, MIDDLE_LEFT, MIDDLE, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_MIDDLE, BOTTOM_RIGHT;

  • Setting and getting the bounds in all modes and relating to all special points will be realized in the concrete tasks for position, size and Z Order.
  • Calculating of the bounds of a frame using different modes and points will be demonstrated in the concrete tasks for position, size and Z Order.

Implementation

Testing

Comments

(Write comments for this or later revisions here.)