⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawable.h

📁 下载来的一个看图软件的源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
private:  unsigned int _miterlimit;};// Stroke antialiasclass MagickDLLDecl DrawableStrokeAntialias : public DrawableBase{public:  DrawableStrokeAntialias ( bool flag_ )    : _flag(flag_)    { }  /*virtual*/ ~DrawableStrokeAntialias ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void flag( bool flag_ )    {      _flag = flag_;    }  bool flag( void ) const    {      return _flag;    }private:  bool _flag;};// Stroke colorclass MagickDLLDecl DrawableStrokeColor : public DrawableBase{public:  DrawableStrokeColor ( const Color &color_ );  DrawableStrokeColor ( const DrawableStrokeColor& original_ );  /*virtual*/ ~DrawableStrokeColor ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void color( const Color& color_ )    {      _color = color_;    }  Color color( void ) const    {      return _color;    }private:  Color _color;};// Stroke opacityclass MagickDLLDecl DrawableStrokeOpacity : public DrawableBase{public:  DrawableStrokeOpacity ( double opacity_ )    : _opacity(opacity_)    {    }  /*virtual*/ ~DrawableStrokeOpacity ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void opacity( double opacity_ )    {      _opacity = opacity_;    }  double opacity( void ) const    {      return _opacity;    }private:  double _opacity;};// Stroke widthclass MagickDLLDecl DrawableStrokeWidth : public DrawableBase{public:  DrawableStrokeWidth ( double width_ )    : _width(width_)    { }  /*virtual*/ ~DrawableStrokeWidth ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void width( double width_ )    {      _width = width_;    }  double width( void ) const    {      return _width;    }private:  double _width;};// Draw text at pointclass MagickDLLDecl DrawableText : public DrawableBase{public:  DrawableText ( const double x_, const double y_,                 const std::string &text_ );  DrawableText ( const double x_, const double y_,                 const std::string &text_, const std::string &encoding_);  DrawableText ( const DrawableText& original_ );  /*virtual*/ ~DrawableText ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void encoding(const std::string &encoding_)    {      _encoding = encoding_;    }  void x( double x_ )    {      _x = x_;    }  double x( void ) const    {      return _x;    }  void y( double y_ )    {      _y = y_;    }  double y( void ) const    {      return _y;    }  void text( const std::string &text_ )    {      _text = text_;    }  std::string text( void ) const    {      return _text;    }private:  double      _x;  double      _y;  std::string _text;  std::string _encoding;};// Text antialiasclass MagickDLLDecl DrawableTextAntialias : public DrawableBase{public:  DrawableTextAntialias ( bool flag_ );  DrawableTextAntialias( const DrawableTextAntialias &original_ );  /*virtual*/ ~DrawableTextAntialias ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void flag( bool flag_ )    {      _flag = flag_;    }  bool flag( void ) const    {      return _flag;    }private:  bool _flag;};// Decoration (text decoration)class MagickDLLDecl DrawableTextDecoration : public DrawableBase{public:  DrawableTextDecoration ( DecorationType decoration_ );  DrawableTextDecoration ( const DrawableTextDecoration& original_ );  /*virtual*/ ~DrawableTextDecoration( void );  // Operator to invoke equivalent draw API call  /*virtual*/  void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void decoration( DecorationType decoration_ )    {      _decoration = decoration_;    }  DecorationType decoration( void ) const    {      return _decoration;    }private:  DecorationType _decoration;};// Text undercolor boxclass MagickDLLDecl DrawableTextUnderColor : public DrawableBase{public:  DrawableTextUnderColor ( const Color &color_ );  DrawableTextUnderColor ( const DrawableTextUnderColor& original_ );  /*virtual*/ ~DrawableTextUnderColor ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void color( const Color& color_ )    {      _color = color_;    }  Color color( void ) const    {      return _color;    }private:  Color _color;};// Apply Translationclass MagickDLLDecl DrawableTranslation : public DrawableBase{public:  DrawableTranslation ( double x_, double y_ )    : _x(x_),      _y(y_)    { }  /*virtual*/ ~DrawableTranslation ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ DrawableBase* copy() const;  void x( double x_ )    {      _x = x_;    }  double x( void ) const    {      return _x;    }  void y( double y_ )    {      _y = y_;    }  double y( void ) const    {      return _y;    }private:  double _x;  double _y;};// Set the size of the viewboxclass MagickDLLDecl DrawableViewbox : public DrawableBase{public:  DrawableViewbox(unsigned long x1_, unsigned long y1_,                  unsigned long x2_, unsigned long y2_)    : _x1(x1_),      _y1(y1_),      _x2(x2_),      _y2(y2_) { }  /*virtual*/ ~DrawableViewbox ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/  DrawableBase* copy() const;  void x1( unsigned long x1_ )    {      _x1 = x1_;    }  unsigned long x1( void ) const    {      return _x1;    }  void y1( unsigned long y1_ )    {      _y1 = y1_;    }  unsigned long y1( void ) const    {      return _y1;    }  void x2( unsigned long x2_ )    {      _x2 = x2_;    }  unsigned long x2( void ) const    {      return _x2;    }  void y2( unsigned long y2_ )    {      _y2 = y2_;    }  unsigned long y2( void ) const    {      return _y2;    }private:  unsigned long _x1;  unsigned long _y1;  unsigned long _x2;  unsigned long _y2;};//// Path Element Classes To Support DrawablePath//class MagickDLLDecl PathArcArgs{public:  PathArcArgs( void );  PathArcArgs( double radiusX_, double radiusY_,               double xAxisRotation_, bool largeArcFlag_,               bool sweepFlag_, double x_, double y_ );  PathArcArgs( const PathArcArgs &original_ );  ~PathArcArgs ( void );  void radiusX( double radiusX_ )    {      _radiusX = radiusX_;    }  double radiusX( void ) const    {      return _radiusX;    }  void radiusY( double radiusY_ )    {      _radiusY = radiusY_;    }  double radiusY( void ) const    {      return _radiusY;    }  void xAxisRotation( double xAxisRotation_ )    {      _xAxisRotation = xAxisRotation_;    }  double xAxisRotation( void ) const    {      return _xAxisRotation;    }  void largeArcFlag( bool largeArcFlag_ )    {      _largeArcFlag = largeArcFlag_;    }  bool largeArcFlag( void ) const    {      return _largeArcFlag;    }  void sweepFlag( bool sweepFlag_ )    {      _sweepFlag = sweepFlag_;    }  bool sweepFlag( void ) const    {      return _sweepFlag;    }  void x( double x_ )    {      _x = x_;    }  double x( void ) const    {      return _x;    }  void y( double y_ )    {      _y = y_;    }  double y( void ) const    {      return _y;    }private:  double	_radiusX;	// X radius  double	_radiusY;	// Y radius  double	_xAxisRotation;	// Rotation relative to X axis  bool        _largeArcFlag;	// Draw longer of the two matching arcs  bool        _sweepFlag;	// Draw arc matching clock-wise rotation  double	_x;		// End-point X  double	_y;		// End-point Y};// Compare two PathArcArgs objects regardless of LHS/RHSMagickDLLDeclExtern int operator == ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );MagickDLLDeclExtern int operator != ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );MagickDLLDeclExtern int operator >  ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );MagickDLLDeclExtern int operator <  ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );MagickDLLDeclExtern int operator >= ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );MagickDLLDeclExtern int operator <= ( const PathArcArgs& left_,                                      const PathArcArgs& right_ );typedef std::list<Magick::PathArcArgs> PathArcArgsList;#if defined(MagickDLLBuild)MagickDrawableExtern template class MagickDLLDeclstd::allocator<Magick::PathArcArgs>;MagickDrawableExtern template class MagickDLLDeclstd::list<Magick::PathArcArgs, std::allocator<Magick::PathArcArgs> >;#endif // MagickDLLBuild// Path Arc (Elliptical Arc)class MagickDLLDecl PathArcAbs : public VPathBase{public:  // Draw a single arc segment  PathArcAbs ( const PathArcArgs &coordinates_ );  // Draw multiple arc segments  PathArcAbs ( const PathArcArgsList &coordinates_ );  // Copy constructor  PathArcAbs ( const PathArcAbs& original_ );  // Destructor  /*virtual*/ ~PathArcAbs ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ VPathBase* copy() const;private:  PathArcArgsList _coordinates;};class MagickDLLDecl PathArcRel : public VPathBase{public:  // Draw a single arc segment  PathArcRel ( const PathArcArgs &coordinates_ );  // Draw multiple arc segments  PathArcRel ( const PathArcArgsList &coordinates_ );  PathArcRel ( const PathArcRel& original_ );  /*virtual*/ ~PathArcRel ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ VPathBase* copy() const;private:  PathArcArgsList _coordinates;};// Path Closepathclass MagickDLLDecl PathClosePath : public VPathBase{public:  PathClosePath ( void )    : _dummy(0)    {    }  /*virtual*/ ~PathClosePath ( void );  // Operator to invoke equivalent draw API call  /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const;  // Return polymorphic copy of object  /*virtual*/ VPathBase* copy() const;private:  int   _dummy;};//// Curveto (Cubic Bezier)//class MagickDLLDecl PathCurvetoArgs{public:  PathCurvetoArgs( void );  PathCurvetoArgs( double x1_, double y1_,                   double x2_, double y2_,                   double x_, double y_ );  PathCurvetoArgs( const PathCurvetoArgs &original_ );  ~PathCurvetoArgs ( void );  void x1( double x1_ )    {      _x1 = x1_;    }double x1( void ) const{  return _x1;}

⌨️ 快捷键说明

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