Last modified 16 years ago
Last modified on 02/03/09 15:38:37
Analysis
Overview
The frame could be filled with a single image.
Task requirements
- If the user chooses the IMAGE filling type a image square should be shown instead of a color picker on the right.
- Initially it is white. The user can chhose a image for the filling by drag and drop one from the resources palette.
- The frame should be filled with this image. Initially the frames size and shape are changed to fit the pickture best.
- If the frames size property is locked or the user changes the size of a frame after a image is already added to it the image is stretched to fit the frame.
Task result
The result of this task is source code.
Implementation idea
Calculate the needed scene image element to fill the frame and add it to the frame scene element. Use the java.awt.Graphics2D methods to show the image resource accordingly.
Related
FRAME_APPEARANCE_HALO_AND_HUD_R0
FRAME_FILLING_GRADIENT_R0
FRAME_FILLING_SOLID_R0
FRAME_FILLING_PATTERN_R0
How to demo
- Create two frames. Add a big image resource.
- Choose the image filling for the both frames and drag the image to the image square.
- Resize one of the frames and demonstrate the images behaviour.
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.)