I'm making an image cropping component, and it's 98% of the
way done. I'm running into an issue and need a technique / strateg-ery
advice, please:
The component allows the user to drag an Image
around under a crop "window" (width and height adjustable). The cropped
result can be gotten as an Image or BitmapData to be sent to the server, shown
on the screen, or, well, whatever the developer wants to do with the data.
One property of the component is "gutter". It's a 1 pixel -- ? pixel thick
border all around the edges that the image does not show through. It
allows the sides of the crop window to be pulled all the way to the edge of the
image and still be visible (the gutter is forced to be at LEAST 1 pixel).
I hope that manes sense.
I want the component to have a 'get' property
called "maxAvailableGutter" that, duh, tells you what the maximum gutter value
can be (it's the unscaledwidth (or unscaledheight, whatever's smaller) of
the component / 2 - 1 pixel) so that if you max out the gutter, the image still
shows through at least 1 pixel and you can grab it and drag it. If a
developer wanted to have a NumericStepper to set the width of the
gutter, the could bind the Maximum property of the Stepper to
MaxAvailableGutter. Make sense? Probably not, but...
So... Everyithng works fine, except when the
component initializes itself. It seems like "unscaledWidth" is not yet
defined?
I'm wondering how to have values available as get
where their calculation depends on the width and height? Should I not be
using "unscaled" outside of updateDisplayList ('cause I am -- get
maxAvailableGutter is its own function).
Thanks!
I'll upload some code if needed, just not near my
development box right now.
-- TC
PS - I'm really psyched this group
exists
__._,_.___
SPONSORED LINKS
| Software development tool | Application development software | Development software |
| Development outsourcing software | Embedded software development |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
