How to make a square topped, round rect bottomed graphic?

Richmond richmondmathewson at gmail.com
Wed Dec 1 11:05:50 EST 2010


On 12/01/2010 05:55 PM, David Bovill wrote:
> Have you seen these (I've not played with them myself):
>
> the joinStyle of graphic ...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    Specifies how corners between lines are drawn. It can be one of the
>> following:
>>      - bevel: a straight line is drawn between the outer edges of the
>> adjoining lines
>>      - round: a circular arc is drawn between the outer edges of the
>> adjoining lines
>>      - miter: outer edges are extended to meet at a sharp point. If the
>> distance from the corner exceeds the miter limit (see below), a bevel join
>> is used for the corner.
>>
>>    Note: This only affects polygon, freehand curve and line graphics which
>> have their antialiased set to true.
>>
>>
>> the miterLimit of graphic ...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    Specifies how much miter joins are allowed to extend beyond the meeting
>> point of the two lines. The miterLimit is specified as a real multiple of
>> the line width.
>>
>>    Note: This only affects polygon, freehand curve and line graphics which
>> have their antialiased set to true.
>>
>>
>> the capStyle of graphic ...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    Specifies how the line ends (and dash ends) will be drawn. It can be one
>> of the following:
>>      - butt: no cap is added
>>      - square: the edge is extended beyond the end-point by half the line
>> width
>>      - round: lines are ended by a half-circle centered at the end point of
>> the line
>>
>>    Note: This only affects polygon, freehand curve and line graphics which
>> have their antialiased set to true.
>>
>
> On 1 December 2010 15:48, Richmond<richmondmathewson at gmail.com>  wrote:
>
>> What follows is a personal fantasy:
>>
>> on mouseUp
>>    set the roundRadius of parameter 1 of graphic "WONKY" to 0
>>    set the roundRadius of parameter 2 of graphic "WONKY" to 0
>>    set the roundRadius of parameter 3 of graphic "WONKY" to 50
>>    set the roundRadius of parameter 4 of graphic "WONKY" to 50
>> end mouseUp
>>
>> SADLY, it is ONLY a fantasy . . .  :(
>>
> Or a sad fantasy :)
> _______________________________________________
The problem is that one can apply roundRadius, joinStyle and so on in
what we could term a 'global' fashion insofar as they refer to all the 
extremities
on a polygon graphic.

It might not be a bad idea to consider implementing the ability to 
manipulate
corners (e.g. via roundRadius) individually in a future version of Livecode.



More information about the Use-livecode mailing list