Version 24 (modified by danvisel, 16 years ago) (diff) |
---|
Analysis
Overview
When the fill style is "pattern", the background of the frame or the page becomes another image which is repeated. This revision only requires selecting an image and repeating it.
In future revisions of this task, it would be nice to allow pattern rotation, resizing, and offset as well as selecting an image through drag and drop; because of these settings it will be necessary to have a pattern settings window.
Task requirements
- If the user chooses the PATTERN fill type in the frame or page background & border HUD, a "select pattern" button should be shown instead of the color square.
- The default pattern fill is empty.
- When the pattern settings button is clicked, it brings up a file dialogue prompting the user to select an image for the pattern. Clicking this when a pattern has already been set replaces the images with a new one.
Task result
The result of this task is source code.
Implementation idea
Use the current Filling interface to create ImmPattern class which will consist of image to be patterned and some other things (decide in the design section).
Related
FRAME_APPEARANCE_HALO_AND_HUD_R0
FRAME_FILLING_GRADIENT_R0
FRAME_FILLING_SOLID_R0
FRAME_FILLING_IMAGE_R0
How to demo
- Make a new book, add an image to the resources. Open page's background & border HUD, choose pattern fill, set an image as the pattern. Then add a text frame to a page. Open frame's background & border HUD, choose pattern fill, select another image to use at the pattern.
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))