lout-users
[Top][All Lists]
Advanced

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

Re: About flowcharts


From: Mark Summerfield
Subject: Re: About flowcharts
Date: Fri, 25 Mar 2011 20:09:48 +0000

Hi Dominique,

On Fri, 25 Mar 2011 15:58:15 +0100 (CET)
address@hidden wrote:
> Hello,
> 
> I would like to know if someone has already built flowcharts with
> Lout? I mean by flowcharts, something like in this paper:
> http://se.uwaterloo.ca/~dberry/FTP_SITE/reprints.journals.conferences/flo.conference.paper.pdf
> Thanks.
> 
> Dominique Cretel

Below are some basic ones I created ages ago. I haven't used them in a
while and they're probably not perfect but they might prove helpful to
get you started:

# Just cut from here to END and save to, say flowchart.lout, and then in
# the file you want to use them do:
#   @SysInclude{diag}
#   @Include{flowchart.lout}
#
# Here is the list of shapes:
#  Decision: Use @Diamond
# @FileBox
# @FolderBox
# @ManualInput 
# @ManualOp 
# @OPConnector 
# @PredefProcess 
# @Preparation 
#  Process: Use @Box
# @Printout 
# @SlantBox 
# @StoredData 

extend @DiagSetup @Diag
macro @FileBox {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 0
            0 ysize
            xsize - 0.5f ysize
            xsize ysize - 0.5f
            xsize 0
            0 0
            []
            xsize - 0.5f ysize
            xsize - 0.5f ysize - 0.5f
            xsize ysize - 0.5f
        }
}

extend @DiagSetup @Diag
macro @FolderBox {
    @Node 
        outline {
            N:: { xsize / 2 ysize - 0.4f }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 0
            0 ysize - 0.4f
            0.4f ysize 
            xsize * 0.33 ysize
            xsize * 0.33 + 0.4f ysize - 0.4f
            xsize ysize - 0.4f
            xsize 0
            0 0
        }
}

extend @DiagSetup @Diag
macro @SlantBox {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0.3f ysize / 2 }
            E:: { xsize - 0.3f ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 0 
            0.6f ysize 
            xsize ysize 
            xsize - 0.6f 0 
            0 0 
        }
}

extend @DiagSetup @Diag
macro @OPConnector {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 ysize
            xsize ysize
            xsize 0.4f
            xsize / 2 0
            0 0.4f
            0 ysize
        }
}

extend @DiagSetup @Diag
macro @StoredData {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize - 0.4f ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0.4f 0
            [ 1.0f ysize / 2 clockwise ]
            0.4f ysize
            xsize ysize
            [ xsize + 1.0f ysize / 2 ]
            xsize 0
            0.4f 0
        }
}

extend @DiagSetup @Diag
macro @DirectData {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0.4f 0
            [ 1.0f ysize / 2 clockwise ]
            0.4f ysize
            xsize - 0.4f ysize
            [ xsize + 1.0f ysize / 2 ]
            xsize - 0.4f 0
            0.4f 0
            []
            xsize - 0.4f 0
            [ xsize - 1.0f ysize / 2 ]
            xsize - 0.4f ysize 
        }
}

extend @DiagSetup @Diag
macro @Printout {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0.2f }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 ysize
            0 0.2f
            [ xsize / 4 1.0f ]
            xsize / 2 0.2f
            [ xsize * 0.75 1.4f ]
            xsize 0.4f
            xsize ysize
            0 ysize
        }
}

extend @DiagSetup @Diag
macro @Preparation {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 ysize / 2
            0.4f ysize
            xsize - 0.4f ysize
            xsize ysize / 2
            xsize - 0.4f 0
            0.4f 0
            0 ysize / 2
        }
}

extend @DiagSetup @Diag
macro @ManualOp {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0.2f ysize / 2 }
            E:: { xsize - 0.2f ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 ysize
            xsize ysize
            xsize - 0.4f 0
            0.4f 0
            0 ysize
        }
}

extend @DiagSetup @Diag
macro @ManualInput {
    @Node 
        outline {
            N:: { xsize / 2 ysize - 0.2f }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 0
            0 ysize - 0.4f
            xsize ysize
            xsize 0
            0 0
        }
}

extend @DiagSetup @Diag
macro @PredefProcess {
    @Node 
        outline {
            N:: { xsize / 2 ysize }
            S:: { xsize / 2 0 }
            W:: { 0 ysize / 2 }
            E:: { xsize ysize / 2 }
            CTR:: { xsize / 2 ysize / 2 }
            0 0
            0 ysize
            xsize ysize
            xsize 0
            0 0
            []
            0.4f 0
            0.4f ysize
            []
            xsize - 0.4f 0
            xsize - 0.4f ysize
        }
}
### END


-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Go" - ISBN 0321774639
            http://www.qtrac.eu/gobook.html



reply via email to

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