Board
0.9.5
|
@copyright 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 http://foureys.users.greyc.fr/ More...
#include "Board.h"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <typeinfo>
#include "board/PSFonts.h"
#include "board/Point.h"
#include "board/Rect.h"
#include "board/Shape.h"
#include "board/ShapeVisitor.h"
#include "board/Tools.h"
Functions | |
Group | LibBoard::grid (Point topLeft, size_t columns, size_t rows, double width, double height, Color penColor, Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin) |
Group | LibBoard::grid (Point topLeft, size_t columns, size_t rows, double width, double height, const Style &style=Style::defaultStyle()) |
Group | LibBoard::cross (Point p, const Style &style=Style::defaultStyle()) |
Polyline | LibBoard::bezierControls (const Bezier &bezier, const Style &style=Style::defaultStyle()) |
Produce a polyline of the Biezer vertices and control points. More... | |
Group | LibBoard::array (Point topLeft, const std::vector< Color > &colors, unsigned int columns, unsigned int rows, double pixelWidth, double pixelHeight=0.0, double lineWidth=0.0) |
Produce a rectangular color matrix. More... | |
Group | LibBoard::framed (const Shape &shape, const Color &color=Style::defaultPenColor(), double lineWidth=Style::defaultLineWidth(), double margin=0.0, int sketchyCount=0) |
Surround a shape with a rectangular frame. More... | |
@copyright 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 http://foureys.users.greyc.fr/
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Group LibBoard::array | ( | Point | topLeft, |
const std::vector< Color > & | colors, | ||
unsigned int | columns, | ||
unsigned int | rows, | ||
double | pixelWidth, | ||
double | pixelHeight = 0.0 , |
||
double | lineWidth = 0.0 |
||
) |
Produce a rectangular color matrix.
topLeft | |
colors | |
columns | |
rows | |
pixelWidth | |
pixelHeight | if zero (default), then it take the same value as pixelHeight |
lineWidth | if zero, pixels are drawn with Color::Null outline (i.e. color is "none") |
References LibBoard::array().
Referenced by LibBoard::array().
Polyline LibBoard::bezierControls | ( | const Bezier & | bezier, |
const Style & | style = Style::defaultStyle() |
||
) |
Produce a polyline of the Biezer vertices and control points.
bezier | A Bezier |
style | Style of the polyline |
References LibBoard::Path::back(), and LibBoard::bezierControls().
Referenced by LibBoard::bezierControls().
Group LibBoard::cross | ( | Point | p, |
const Style & | style = Style::defaultStyle() |
||
) |
Make a small cross
p | |
style |
References LibBoard::cross(), and LibBoard::Point::translated().
Referenced by LibBoard::cross().
Group LibBoard::framed | ( | const Shape & | shape, |
const Color & | color = Style::defaultPenColor() , |
||
double | lineWidth = Style::defaultLineWidth() , |
||
double | margin = 0.0 , |
||
int | sketchyCount = 0 |
||
) |
Surround a shape with a rectangular frame.
shape | A shape |
color | Frame color |
lineWidth | Frame line width |
margin | Frame inner mergin |
sketchyCount | If set to zero, the frame is a straight one, otherwise a sketchy frame is produced with given repetition count. |
References LibBoard::framed().
Referenced by LibBoard::framed().
Group LibBoard::grid | ( | Point | topLeft, |
size_t | columns, | ||
size_t | rows, | ||
double | width, | ||
double | height, | ||
Color | penColor, | ||
Color | fillColor, | ||
double | lineWidth, | ||
const LineStyle | style = SolidStyle , |
||
const LineCap | cap = ButtCap , |
||
const LineJoin | join = MiterJoin |
||
) |
Build a grid with specified number of rows and columns and a given size.
topLeft | Coordinates of the top left point of the grid. |
columns | Number of columns of the grid. |
rows | Number of rows of the grid. |
width | Width of the grid. |
height | Height of the grid. |
penColor | Color of the lines. |
fillColor | Background color. |
lineWidth | Line width. |
style | Line style (default is Board::SolidStyle). |
cap | Line cap (default is Board::ButtCap). |
join | Line join (default is Board::MiterJoin). |
References LibBoard::grid().
Referenced by LibBoard::grid().
Group LibBoard::grid | ( | Point | topLeft, |
size_t | columns, | ||
size_t | rows, | ||
double | width, | ||
double | height, | ||
const Style & | style = Style::defaultStyle() |
||
) |
Build a grid with specified number of rows and columns and a given size.
topLeft | Coordinates of the top left point of the grid. |
columns | Number of columns of the grid. |
rows | Number of rows of the grid. |
width | Width of the grid. |
height | Height of the grid. |
style | Shape style |
References LibBoard::grid().