wiki:FRAME_FILLING_PATTERN_R0

Version 3 (modified by danvisel, 16 years ago) (diff)

--

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

Error: Macro TicketQuery(summary=FRAME_FILLING_PATTERN_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

When the fill style is "pattern", the background of the frame becomes another image, possibly repeated and patterned.

Task requirements

  • If the user chooses the PATTERN fill type a "pattern settings" button should be shown instead of the color square.
  • The default pattern fill is empty.
  • When the pattern settings button is clicked, the pattern settings window is opened, allowing the user to change the pattern settings.
  • The pattern settings window has the following elements:
    • A drop box, where an image can be dragged from the resources. This image becomes the pattern; dragging a second image onto the drop box changes the pattern to the second image.
    • The image rotation field, a field where the author can enter a rotation percentage in degrees clockwise. Default is 0.
    • Image width & height fields: these can either be in percent (default being 100%) or in points (default being the images size).
    • A "lock" setting: if this is set, width and height change proportionately.
    • An opacity slider, allowing changes to the opacity of the image. Default is 100% opaque.
    • An "Okay" button: when this is clicked, the pattern settings window is closed.

Task result

The result of this task is source code.

Implementation idea

Calculate the needed scene image elements to fill the frame and add them to the frame scene element. Use the java.awt.Graphics2D methods to show the image resource.

FRAME_APPEARANCE_HALO_AND_HUD_R0
FRAME_FILLING_GRADIENT_R0
FRAME_FILLING_SOLID_R0
FRAME_FILLING_IMAGE_R0

How to demo

  • Add a small image resource, choose the pattern filling from the frame appearance hud and drag the image to the pattern square.

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.)