Board 0.9.6
|
Sample code showing the use of shape iterators as well as the ShapeList::topLevelFindLast<T>(n) method. More...
Functions | |
ShapeList | generateGroup (int n) |
template<typename T > | |
ShapeList | findAll (ShapeList &list) |
int | main (int, char *[]) |
Variables | |
const int | NbColors = 4 |
const Color | Colors [NbColors] = {Color("#cc0000"), Color("#00cc00"), Color("#0000cc"), Color("#c0c0c0")} |
Sample code showing the use of shape iterators as well as the ShapeList::topLevelFindLast<T>(n) method.
This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey https://fourey.users.greyc.fr
Extract all shapes of a given type (T) thanks to the topLevelFindLast<>() method.
References LibBoard::ShapeList::append(), and LibBoard::ShapeList::topLevelFindLast().
ShapeList generateGroup | ( | int | n | ) |
References LibBoard::ShapeList::append(), LibBoard::Color::Black, LibBoard::Tools::boardRand(), LibBoard::circle(), Colors, LibBoard::DashStyle, generateGroup(), NbColors, LibBoard::Color::Null, LibBoard::rectangle(), and LibBoard::UseLineWidth.
Referenced by generateGroup(), and main().
int main | ( | int | , |
char * | [] | ||
) |
References LibBoard::ShapeList::append(), LibBoard::Color::Blue, LibBoard::Tools::boardRand(), LibBoard::ShapeList::breadthFirstBegin(), LibBoard::ShapeList::breadthFirstEnd(), LibBoard::Shape::center(), LibBoard::circle(), LibBoard::cross(), LibBoard::ShapeList::deepSize(), LibBoard::ShapeList::depthFirstBegin(), LibBoard::ShapeList::depthFirstEnd(), generateGroup(), LibBoard::Color::Green, LibBoard::Fonts::Helvetica, LibBoard::Tools::initBoardRand(), LibBoard::ShapeList::last(), LibBoard::ShapeList::name(), LibBoard::Color::Null, LibBoard::ShapeList::DepthFirstIterator::pointer(), LibBoard::rectangle(), LibBoard::RoundCap, LibBoard::RoundJoin, LibBoard::Board::saveSVG(), LibBoard::ShapeList::scale(), LibBoard::Style::setDefaultFillColor(), LibBoard::Style::setDefaultLineWidth(), LibBoard::Style::setDefaultPenColor(), LibBoard::Color::setRGBf(), LibBoard::ShapeList::size(), and LibBoard::SolidStyle.
const Color Colors[NbColors] = {Color("#cc0000"), Color("#00cc00"), Color("#0000cc"), Color("#c0c0c0")} |
Referenced by generateGroup().
const int NbColors = 4 |
Referenced by generateGroup().