wiki:PAGE_BORDER_R0
Last modified 3 years ago Last modified on 05/28/09 16:23:28

Pages linking to PAGE_BORDER_R0:
TASK_INDEX
GROUP_PAGE_PROPERTIES_R0

Ticket Summary Owner Status Type Component Priority Effort Importance
#681 PAGE_BORDER_R0 deni closed planned_task PAGE_PROPERTIES 3 0.5 0

Reported by Astea, 4 years ago.

Description

wiki page: PAGE_BORDER_R0 - effort: 0.5d

Analysis_owners

deni

Analysis_reviewers

meddle, todor

Analysis_score

3

Design_owners

deni

Design_reviewers

pap,pap

Design_score

3.5

Imp._owners

deni

Imp._reviewers

meddle, meddle

Imp._score

3.5

Test_score

0

Analysis

Overview

The page border is currently drawn entirely outside the page. This makes the page bigger than its expected size and could cause problems with printing and fullscreen mode for example.

Task requirements

  • The page border should be drawn inside the page boundaries.
  • The page border should not change the page size
  • The page content area should not include borders (see the picture below)
+--PAGE--------------------------+
|              top               |
|  +---------------------------+ |
|l |                           |r|
|e |                           |i|
|f |       Page Content        |g|
|t |                           |h|
|  |                           |t|
|  |                           | |
|  +---------------------------+ |
|                                |
|            bottom              |
+--------------------------------+

Task result

The result of this task is code.

Implementation idea

Change the page border position and the page background and page content size.

How to demo

Since there will be no visible difference now, show this wiki page.

Design

The only class that needs to be changed is:
org.sophie2.main.app.commons.page.areas.PageWorkArea

  • pageBorder().pageBorder.compute()

The page bounds should coincide with the margin bounds.
Using the BoundMode enumeration we could get the content/border bounds in the following way:

Rectangle rect = new Rectangle(page().get().getParent().pageSize().get().toDimension());
					
ImmRect content = BoundMode.MARGIN.setRect(new ImmRect(rect),  paddingInsets, borderInsets, marginsInsets);
ImmRect inBorder = BoundMode.IN_BORDER.getRect(content, paddingInsets, borderInsets, marginsInsets);
ImmRect outBorder = BoundMode.OUT_BORDER.getRect(content, paddingInsets, borderInsets, marginsInsets);

For now all padding and margin widths will set to 0, but when they are implemented no changes will be necessary.

  • pageBackground().pageBackground.compute()

The page background rectangle should not be the whole page, it should exclude the margins and the page border.
Therefore the shape() property of the scene should be set to the inner border rectangle.

Test: [2799]

Design related code committed to trunk: [2843]

Implementation

Done according to the design: [2951], [2954].

Merged to the trunk in [2955].

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)