Version 22 (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 imagePattern class which will consist of image to be patterned and some other things.
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 border & fill HUD, choose pattern fill, set the image in the resources as the pattern image, change settings to demonstrated possibilities. Then add a text frame to a page. Open frame's border & fill HUD, choose pattern fill, set the image in the resources as the pattern image, change settings to something different from what is used on the page.
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))