basicshape.hpp

来自「一个gps小工具包」· HPP 代码 · 共 96 行

HPP
96
字号
///@file BasicShape.hpp Interface for all basic shapes.  Manages common objects/calls.//============================================================================////  This file is part of GPSTk, the GPS Toolkit.////  The GPSTk 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 2.1 of the License, or//  any later version.////  The GPSTk 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 GPSTk; if not, write to the Free Software Foundation,//  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//  //  Copyright 2004, The University of Texas at Austin////============================================================================#ifndef VPLOT_BASICSHAPE_H#define VPLOT_BASICSHAPE_Hnamespace vplot{   /** \addtogroup BasicVectorGraphics */    //@{   /**    * This is an interface for basic shapes to group them together.  These include    * circles, rectangles, lines, and polygons.  All of these objects can contain    * a StrokeStyle.    */   class BasicShape {    public:      /**       * Constructors and Destructor       */      /**       * Default constructor.       */      BasicShape(void)         : hasLineStyle(false)      {}      /**       * Constructor.  Defines a basic shape by a StrokeStyle.       * @param istyle appearance of the stroke       */      BasicShape(const StrokeStyle& istyle)         : lineStyle(istyle), hasLineStyle(true)      {}      /// Accessor. Does this basic shape have a preferred appearance?      bool hasOwnStrokeStyle(void) const { return hasLineStyle; }      /// Accessor. What is the style associated with this basic shape      StrokeStyle getStrokeStyle(void) const { return lineStyle; }            /// Mutator. Set the stroke style      void setStrokeStyle(const StrokeStyle& istyle) { lineStyle=istyle;hasLineStyle=true; }        /// Mutator. Remove the stroke style...use default      void removeStrokeStyle(void) { hasLineStyle=false; }   protected:      /// Default line style      StrokeStyle lineStyle;      /// A lineStyle has been set?      bool hasLineStyle;   private:   }; // class BasicShape   //@} group BasicVectorGraphics} // namespace vplot#endif //VPLOT_BASICSHAPE_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?