[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: width in outline
From: |
gabor68 |
Subject: |
Re: width in outline |
Date: |
Mon, 31 Mar 2003 15:21:50 +0400 (MSD) |
User-agent: |
eGroups-EW/0.82 |
Here is the example:
@SysInclude { slides }
@SysInclude { diag }
macro @FF { 0.9vx @Break -2p @Font @F }
def @Class right name { @F address@hidden address@hidden angleright}} }
def @Symbol right name { @F {"#\""name"\""} }
def @Method left name right sig address@hidden Method @LLP @FF
{name"{"sig"}"}}
def @GF left name right sig address@hidden Generic Function @LLP @F
{name"{"sig"}"}}
extend @DiagSetup @Diag
def @GModule right name { darkblue @Colour @Box translate { NW to 0.0,
1.0 } { Module @F name } }
extend @DiagSetup @Diag
macro @GMethod { darkgreen @Colour @Ellipse }
extend @DiagSetup @Diag
macro @GGF { darkcyan @Colour @CurveBox }
extend @DiagSetup @Diag
def @GFLink right meth { @Link arrow { yes } from { GF } to { meth }
linklabelfont { -5p } ylabel { @Char address@hidden
guillemotleft }}
extend @DiagSetup @Diag
def @SlotLink left lfrom right lto { @Link arrow { yes } linklabelfont
{ -5p } ylabel { @Char address@hidden guillemotleft }
from { lfrom } to { lto } }
extend @DiagSetup @Diag
def @UMLArrowHead
named width { arrowwidth }
named length { arrowlength }
named pathwidth { pathwidth }
{
@InsulatedNode
paint { white }
outlinestyle { solid }
outlinewidth { pathwidth }
outline {
{ 0.35f atangle -90d }
prev ++ { 1.0f atangle 30d }
prev ++ { 1.0f atangle 150d }
prev ++ { 1.0f atangle -90d }
}
{
length @Wide width @High
}
}
macro @DFalse { @F "#f" }
macro @DTrue { @F "#t" }
macro @Key { "#key" }
macro @BlURL {blue @Colour @F} # blue URL
@OverheadTransparencies
@Title {Example}
@Author {Gabor Greif}
@PageOrientation {Landscape}
//
@Lecture
@Title { Dylan Basics }
@RunningTitle { Dylan }
@Begin
@BeginOverheads
@Overhead
@Title { Inheritance }
@Begin
@Diag {
@Box margin { 0c } 23c @Wide 12.5c @High
//
OBJECT:: @Box
translate { NW to 0.3, 0.98 }
{ Class @Class object
@LP
SLOT1:: gray @Colour @Box margin { 0.2c } {Constant slot @F
object-class "::" @Class class}
}
FOO:: @Box
translate { NW to 0.05, 0.66 }
{ Class @Class foo
@LP
SLOT1:: gray @Colour @Box margin { 0.2c } {Slot @F height "::"
@Class integer}
@LLP
SLOT2:: gray @Colour @Box margin { 0.2c } {Slot @F width "::"
@Class integer}
}
BAR:: @Box
translate { NW to 0.55, 0.62 }
{ Class @Class bar
@LP
SLOT1:: gray @Colour @Box margin { 0.2c } {Slot @F color "::"
@Class rgb-color}
}
FOOBAR:: @Box
translate { SW to 0.15, 0.02 }
{ Class @Class foobar
@LP
SLOT1:: gray @Colour @Box margin { 0.2c } {Slot @F taste "::"
one-of(address@hidden sweet}, address@hidden sour}, address@hidden salty})}
}
@GModule demo
@Link arrow { yes } arrowwidth { 1.0f } arrowlength { 0.866f } tolabel
{ @UMLArrowHead } tolabelangle { 90d } from { FOO } to { address@hidden ++
{1c 0} }
@Link arrow { yes } arrowwidth { 1.0f } arrowlength { 0.866f } tolabel
{ @UMLArrowHead } tolabelangle { 90d } from { BAR } to { address@hidden ++
{3.5c 0} }
@Link arrow { yes } arrowwidth { 1.0f } arrowlength { 0.866f } tolabel
{ @UMLArrowHead } tolabelangle { 90d } from { address@hidden -- {4c 0} } to
{ FOO }
@Link arrow { yes } arrowwidth { 1.0f } arrowlength { 0.866f } tolabel
{ @UMLArrowHead } tolabelangle { 90d } from { address@hidden ++ {4c 0} } to
{ BAR }
}
@End @Overhead
@EndOverheads
@End @Lecture
1) I would have expected:
outline {
{ 0.5f atangle -90d }
prev ++ { 1.0f atangle 30d }
prev ++ { 1.0f atangle 150d }
prev ++ { 1.0f atangle -90d }
}
2) This does not work
outline {
{ {width / 2} atangle -90d }
prev ++ { width atangle 30d }
prev ++ { width atangle 150d }
prev ++ { width atangle -90d }
}
3) As you see in the graphics, a rotated arrow is _really_
difficult to place exactly on the line, you probably have
to adjust it with some sin/cos magic. I think this is
counterintuitive. I expect it to "just work" like in the
unrotated case.
4) Question: what does the first point in an outline do?
Just positioning?
Does this all make sense?
Thanks a lot in any case,
Gabor
-- a very satisfied user of lout
--- In address@hidden, Jeff Kingston <address@hidden> wrote:
> On Sun, 30 Mar 2003 07:50:43 +0400 (MSD), Gabor Greif wrote:
> >
> > Hello all,
> >
> > I have some problems with outlines:
> >
>
> I'll look into these problems if you send me a small test sample.
>
> Jeff Kingston