swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] swfc compiler : question about outlines


From: List_Subs
Subject: Re: [Swftools-common] swfc compiler : question about outlines
Date: Wed, 30 May 2012 17:26:11 +0200

On Wed, 30 May 2012 16:46:41 +0200
"Luc A." <address@hidden> wrote:

> Hello all !
> I've made this piece of code :
> ----------------------------
> .flash filename="/tmp/ella-temp.swf" version=8 fps=12  bbox=240x200
> background="#c3e440"
> .frame 1
> .outline U1_outline:
> M 119,62 L 236,159 L 106,184
> .end
> .filled U1  outline=U1_outline color=#ff0000 fill=none line=1
> .put U1 143 95 alpha=100% pin=center rotate=0
> .frame 2
> .end # End swf movie
> ---------------------------------
> Why the outline (its name is "U1_outline") has its path closed, while
> I haven't added a macro instruction like this "L 119,62" to close the
> path.

Basically, because that is the way it works.  Shapes are always closed,
since the drawing pen never leaves the virtual paper.

To break the path, you must take your drawing pen off the paper and
pecifically move it elsewhere, thus,

.flash filename="ella.swf" version=8 fps=12  bbox=240x200
background="#c3e440"
.frame 1
.outline U1_outline:
M 119,62 L 236,159
M 106,184 L 119,62
.end
.filled U1  outline=U1_outline color=#ff0000 fill=none line=1
.put U1 143 95 alpha=100% pin=center rotate=0
.frame 2
.end # End swf movie

Closed path becomes a bit of an issue when drawing such things as
bezier curves.  Example below, previously posted to the list, gets
round it by overdrawing one of the lines in the background colour,

#~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

.flash filename="bezier.swf" version=10 bbox=800x600

.outline bezier_curve:
   M 500, 400
   C 200,200 0,0 200,450
.end
.outline line:
    M 500, 400
    L 200, 450
.end
   .filled curve outline=bezier_curve fill=none color=blue
   .put curve
   .filled line outline=line fill=none color=black
   .put line
.end

#~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

Try commenting out line thirteen of the code above to see
what happens.

HTH.

Regards,


Chris.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]