How to make a square topped, round rect bottomed graphic?
janschenkel at yahoo.com
Wed Dec 1 10:17:15 EST 2010
--- On Wed, 12/1/10, David Bovill <david at vaudevillecourt.tv> wrote:
> What is the most efficient way to
> make this? I thought I could have a
> polygon graphic which was opaque but not joined up and use
> that to add
> square corners to a roundrect graphic background - but it
> seems that every
> time I make it opaque it automatically joins the graphic
> What I want to be able to do is have a vector graphic which
> has the option
> to have rounded corners on either or both the top and
> bottom, whcih I can
> script. The most efficient way I can thin of doing it at
> the moment is to
> have a background roundrect graphic, on top of which I can
> place a polygon
> line to create square corners, and a white opaque graphic
> just inside the
> square boundary to cover up the round corners?
> Is there a better way?
The easiest solution is to use two graphics and strategic grouping to take care of clipping:
1 Rectangle graphic, grouped to clip off the top or bottom half
1 RoundRect graphic, grouped to clip off the top or bottom half
Then group these two groups and script a behavior to handle resizeControl messages and provide setProp handlers that control the inner groups.
Play around with gradients and graphic effects to finish off.
At least that's how I've done it ;-)
Quartam Reports & PDF Library for LiveCode
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
More information about the Use-livecode