IWORKShape.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 IWORKSHAPE_H_INCLUDED
00011 #define IWORKSHAPE_H_INCLUDED
00012 
00013 #include <boost/shared_ptr.hpp>
00014 
00015 #include "IWORKPath_fwd.h"
00016 #include "IWORKStyle.h"
00017 #include "IWORKText_fwd.h"
00018 
00019 namespace libetonyek
00020 {
00021 
00022 struct IWORKSize;
00023 
00026 struct IWORKShape
00027 {
00028   IWORKGeometryPtr_t m_geometry;
00029   IWORKStylePtr_t m_style;
00030   IWORKPathPtr_t m_path;
00031   IWORKTextPtr_t m_text;
00032 
00033   IWORKShape();
00034 };
00035 
00036 typedef boost::shared_ptr<IWORKShape> IWORKShapePtr_t;
00037 
00040 IWORKPathPtr_t makePolygonPath(const IWORKSize &size, unsigned edges);
00041 IWORKPathPtr_t makeRoundedRectanglePath(const IWORKSize &size, double radius);
00042 
00043 IWORKPathPtr_t makeArrowPath(const IWORKSize &size, double headWidth, double stemThickness);
00044 IWORKPathPtr_t makeDoubleArrowPath(const IWORKSize &size, double headWidth, double stemThickness);
00045 IWORKPathPtr_t makeStarPath(const IWORKSize &size, unsigned points, double innerRadius);
00046 IWORKPathPtr_t makeConnectionPath(const IWORKSize &size, double middleX, double middleY);
00047 
00048 IWORKPathPtr_t makeCalloutPath(const IWORKSize &size, double radius, double tailSize, double tailX, double tailY);
00049 IWORKPathPtr_t makeQuoteBubblePath(const IWORKSize &size, double radius, double tailSize, double tailX, double tailY);
00050 
00051 }
00052 
00053 #endif // IWORKSHAPE_H_INCLUDED
00054 
00055 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */