📄 drawable.h
字号:
private: double _originX; double _originY; double _perimX; double _perimY;};// Colorize at point using PaintMethodclass MagickDLLDecl DrawableColor : public DrawableBase{public: DrawableColor ( double x_, double y_, PaintMethod paintMethod_ ) : _x(x_), _y(y_), _paintMethod(paintMethod_) { } /*virtual*/ ~DrawableColor ( 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; } void paintMethod( PaintMethod paintMethod_ ) { _paintMethod = paintMethod_; } PaintMethod paintMethod( void ) const { return _paintMethod; }private: double _x; double _y; PaintMethod _paintMethod;};// Draw image at point, scaled to size specified by width and heightclass MagickDLLDecl Image;class MagickDLLDecl DrawableCompositeImage : public DrawableBase{public: DrawableCompositeImage ( double x_, double y_, const std::string &filename_ ); DrawableCompositeImage ( double x_, double y_, const Image &image_ ); DrawableCompositeImage ( double x_, double y_, double width_, double height_, const std::string &filename_ ); DrawableCompositeImage ( double x_, double y_, double width_, double height_, const Image &image_ ); DrawableCompositeImage ( double x_, double y_, double width_, double height_, const std::string &filename_, CompositeOperator composition_ ); DrawableCompositeImage ( double x_, double y_, double width_, double height_, const Image &image_, CompositeOperator composition_ ); // Copy constructor DrawableCompositeImage ( const DrawableCompositeImage& original_ ); // Destructor /*virtual*/ ~DrawableCompositeImage( void ); // Assignment operator DrawableCompositeImage& operator= (const DrawableCompositeImage& original_ ); // Operator to invoke equivalent draw API call /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const; // Return polymorphic copy of object /*virtual*/ DrawableBase* copy() const; void composition( CompositeOperator composition_ ) { _composition = composition_; } CompositeOperator composition( void ) const { return _composition; } void filename( const std::string &image_ ); std::string filename( void ) 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; } void width( double width_ ) { _width = width_; } double width( void ) const { return _width; } void height( double height_ ) { _height = height_; } double height( void ) const { return _height; } void image( const Image &image_ ); Magick::Image image( void ) const; // Specify image format used to output Base64 inlined image data. void magick( std::string magick_ ); std::string magick( void );private: CompositeOperator _composition; double _x; double _y; double _width; double _height; Image* _image;};// Ellipseclass MagickDLLDecl DrawableEllipse : public DrawableBase{public: DrawableEllipse ( double originX_, double originY_, double radiusX_, double radiusY_, double arcStart_, double arcEnd_ ) : _originX(originX_), _originY(originY_), _radiusX(radiusX_), _radiusY(radiusY_), _arcStart(arcStart_), _arcEnd(arcEnd_) { } /*virtual*/ ~DrawableEllipse( 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 originX( double originX_ ) { _originX = originX_; } double originX( void ) const { return _originX; } void originY( double originY_ ) { _originY = originY_; } double originY( void ) const { return _originY; } 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 arcStart( double arcStart_ ) { _arcStart = arcStart_; } double arcStart( void ) const { return _arcStart; } void arcEnd( double arcEnd_ ) { _arcEnd = arcEnd_; } double arcEnd( void ) const { return _arcEnd; }private: double _originX; double _originY; double _radiusX; double _radiusY; double _arcStart; double _arcEnd;};// Specify drawing fill colorclass MagickDLLDecl DrawableFillColor : public DrawableBase{public: DrawableFillColor ( const Color &color_ ); DrawableFillColor ( const DrawableFillColor& original_ ); /*virtual*/ ~DrawableFillColor( 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;};// Specify fill rule (fill-rule)class MagickDLLDecl DrawableFillRule : public DrawableBase{public: DrawableFillRule ( const FillRule fillRule_ ) : _fillRule(fillRule_) { } /*virtual*/ ~DrawableFillRule ( 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 fillRule( const FillRule fillRule_ ) { _fillRule = fillRule_; } FillRule fillRule( void ) const { return _fillRule; }private: FillRule _fillRule;};// Specify drawing fill opacityclass MagickDLLDecl DrawableFillOpacity : public DrawableBase{public: DrawableFillOpacity ( double opacity_ ) : _opacity(opacity_) { } /*virtual*/ ~DrawableFillOpacity ( 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;};// Specify text fontclass MagickDLLDecl DrawableFont : public DrawableBase{public: DrawableFont ( const std::string &font_ ); DrawableFont ( const std::string &family_, StyleType style_, const unsigned long weight_, StretchType stretch_ ); DrawableFont ( const DrawableFont& original_ ); /*virtual*/ ~DrawableFont ( 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 font( const std::string &font_ ) { _font = font_; } std::string font( void ) const { return _font; }private: std::string _font; std::string _family; StyleType _style; unsigned long _weight; StretchType _stretch;};// Specify text positioning gravityclass MagickDLLDecl DrawableGravity : public DrawableBase{public: DrawableGravity ( GravityType gravity_ ) : _gravity(gravity_) { } /*virtual*/ ~DrawableGravity ( 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 gravity( GravityType gravity_ ) { _gravity = gravity_; } GravityType gravity( void ) const { return _gravity; }private: GravityType _gravity;};// Lineclass MagickDLLDecl DrawableLine : public DrawableBase{public: DrawableLine ( double startX_, double startY_, double endX_, double endY_ ) : _startX(startX_), _startY(startY_), _endX(endX_), _endY(endY_) { } /*virtual*/ ~DrawableLine ( 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 startX( double startX_ ) { _startX = startX_; } double startX( void ) const { return _startX; } void startY( double startY_ ) { _startY = startY_; } double startY( void ) const { return _startY; } void endX( double endX_ ) { _endX = endX_; } double endX( void ) const { return _endX; } void endY( double endY_ ) { _endY = endY_; } double endY( void ) const { return _endY; }private: double _startX; double _startY; double _endX; double _endY;};// Change pixel matte value to transparent using PaintMethodclass MagickDLLDecl DrawableMatte : public DrawableBase{public: DrawableMatte ( double x_, double y_, PaintMethod paintMethod_ ) : _x(x_), _y(y_), _paintMethod(paintMethod_) { } /*virtual*/ ~DrawableMatte ( 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; } void paintMethod( PaintMethod paintMethod_ ) { _paintMethod = paintMethod_; } PaintMethod paintMethod( void ) const { return _paintMethod; }private: double _x; double _y; PaintMethod _paintMethod;};// Drawable Pathclass MagickDLLDecl DrawablePath : public DrawableBase{public: DrawablePath ( const VPathList &path_ ); DrawablePath ( const DrawablePath& original_ ); /*virtual*/ ~DrawablePath ( void ); // Operator to invoke equivalent draw API call /*virtual*/ void operator()( MagickLib::DrawContext context_ ) const; // Return polymorphic copy of object /*virtual*/ DrawableBase* copy() const;private: VPathList _path;};// Pointclass MagickDLLDecl DrawablePoint : public DrawableBase{public: DrawablePoint ( double x_, double y_ ) : _x(x_), _y(y_) { } /*virtual*/ ~DrawablePoint ( 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; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -