KEYShape.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libetonyek project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef KEYSHAPE_H_INCLUDED
00011 #define KEYSHAPE_H_INCLUDED
00012 
00013 #include <boost/shared_ptr.hpp>
00014 
00015 #include "KEYPath_fwd.h"
00016 #include "KEYStyle.h"
00017 #include "KEYText_fwd.h"
00018 
00019 namespace libetonyek
00020 {
00021 
00022 struct KEYSize;
00023 
00026 struct KEYShape
00027 {
00028   KEYGeometryPtr_t geometry;
00029   KEYStylePtr_t style;
00030   KEYPathPtr_t path;
00031   KEYTextPtr_t text;
00032 
00033   KEYShape();
00034 };
00035 
00036 typedef boost::shared_ptr<KEYShape> KEYShapePtr_t;
00037 
00040 KEYObjectPtr_t makeObject(const KEYShapePtr_t &shape);
00041 
00044 KEYPathPtr_t makePolygonPath(const KEYSize &size, unsigned edges);
00045 KEYPathPtr_t makeRoundedRectanglePath(const KEYSize &size, double radius);
00046 
00047 KEYPathPtr_t makeArrowPath(const KEYSize &size, double headWidth, double stemThickness);
00048 KEYPathPtr_t makeDoubleArrowPath(const KEYSize &size, double headWidth, double stemThickness);
00049 KEYPathPtr_t makeStarPath(const KEYSize &size, unsigned points, double innerRadius);
00050 KEYPathPtr_t makeConnectionPath(const KEYSize &size, double middleX, double middleY);
00051 
00052 KEYPathPtr_t makeCalloutPath(const KEYSize &size, double radius, double tailSize, double tailX, double tailY);
00053 KEYPathPtr_t makeQuoteBubblePath(const KEYSize &size, double radius, double tailSize, double tailX, double tailY);
00054 
00055 }
00056 
00057 #endif // KEYSHAPE_H_INCLUDED
00058 
00059 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */