basicstroke.h

来自「这是VCF框架的代码」· C头文件 代码 · 共 213 行

H
213
字号
#ifndef _VCF_BASICSTROKE_H__#define _VCF_BASICSTROKE_H__//BasicStroke.h/*Copyright 2000-2004 The VCF Project.Please see License.txt in the top level directorywhere you installed the VCF.*/#if _MSC_VER > 1000#   pragma once#endif/* Generated by Together */namespace VCF{class GraphicsContext;/**\class BasicStroke BasicStroke.h "vcf/GraphicsKit/BasicStroke.h"*/class GRAPHICSKIT_API BasicStroke : public VCF::Object, public VCF::Stroke {public:	BasicStroke();	virtual ~BasicStroke();	virtual void setContext( GraphicsContext* context );    virtual void render( Path * path );	double getWidth();	void setWidth( double width );	Color* getColor();	void setColor( Color* color );	double getOpacity() {		return opacity_;	}	void setOpacity( const double& val ) {		opacity_ = minVal<>( maxVal<>( val, 0.0 ), 1.0 );	}	bool allowAntiAlias() {		return antiAlias_;	}	void setAllowAntiAlias( bool val ) {		antiAlias_ = val;	}	/**	Adds a dash and gap. Only takes effect if using AGG	renering buffer.	*/	void addDash( const double& dash, const double& gap ) {		dashed_ = true;		dashGapLen_.push_back( std::make_pair( dash, gap ) );	}	/**	Distance at which dashing starts.	*/	void dashStart( const double& dashStart ) {		dashStart_ = dashStart;	}	/**	Removes ALL dashes that are set.	*/	void removeDashes() {		dashed_ = false;		dashStart_ = 0.0;		dashGapLen_.resize(0);	}private:	double width_;	double opacity_;	Color color_;	GraphicsContext* context_;	bool antiAlias_;	bool dashed_;	double dashStart_;	std::vector< std::pair<double,double> > dashGapLen_;	void line( const double& x1, const double& y1,		       const double& x2, const double& y2 );};}/***CVS Log info*$Log$*Revision 1.4  2006/04/07 02:35:41  ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.3.2.1  2006/03/12 22:42:07  ddiego*more doc updates - specific to graphicskit.**Revision 1.3  2005/07/09 23:05:56  ddiego*added missing gtk files**Revision 1.2.4.1  2005/02/01 19:43:51  dougtinkham*added dash support for AGG rendering**Revision 1.2  2004/08/07 02:49:16  ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.2  2004/04/29 04:10:26  marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.1  2004/04/28 03:40:30  ddiego*migration towards new directory structure**Revision 1.9.4.1  2004/04/26 21:58:38  marcelloptr*changes for dir reorganization: _VCF_MACRO_H__**Revision 1.9  2003/12/18 05:15:58  ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.8.2.1  2003/10/28 04:06:11  ddiego*updated the GraphicsContext and ContextPeer classes to support*slider control drawing. adjusted the Slider control accordingly.*Also changed some of the GraphicsKit headers to conform to the*current header style.**Revision 1.8  2003/08/09 02:56:43  ddiego*merge over from the devmain-0-6-1 branch*Changes*Features:*-Added additional implementation to better support the MVC architecture in*the VCF**-Added a Document/View architecure that is similar to MFC's or NextSteps's*Doc/View architectures**-Integrated the Anti Grain Graphics library into the GraphicsKit. There is*now basic support for it in terms of drawing vector shapes*(fills and strokes). Image support will come in the next release**-Added several documented graphics tutorials**Bugfixes:**[ 775744 ] wrong buttons on a dialog*[ 585239 ] Painting weirdness in a modal dialog ?*[ 585238 ] Modal dialog which makes a modal Dialog*[ 509004 ] Opening a modal Dialog causes flicker*[ 524878 ] onDropped not called for MLTcontrol**Plus an issue with some focus and getting the right popup window to activate*has also been fixed**Revision 1.7.2.2  2003/07/16 04:59:07  ddiego*added some changes to the fil and stroke classes to allow changing whether*they use anti-aliasing or not. Also implemented Matrix2D::invert(),*plus properly implemented clone() on the DefaultMenuItem class.**Revision 1.7.2.1  2003/06/17 03:54:25  ddiego*further agg integration - took out the getImage/putImage from GraphicsContext -*this was too slow. now have an alternate solution that seems to work OK**Revision 1.7  2003/05/17 20:37:09  ddiego*this is the checkin for the 0.6.1 release - represents the merge over from*the devmain-0-6-0 branch plus a few minor bug fixes**Revision 1.6.10.3  2003/04/17 04:29:46  ddiego*updated scintilla, added gtk support for the application kit, with stubs*for the basic peers.**Revision 1.6.10.2  2003/03/23 03:23:48  marcelloptr*3 empty lines at the end of the files**Revision 1.6.10.1  2003/03/12 03:10:13  ddiego*switched all member variable that used the "m_"<name> prefix to* <name>"_" suffix nameing standard.*Also changed all vcf builder files to accomadate this.*Changes were made to the Stream classes to NOT multiple inheritance and to*be a little more correct. Changes include breaking the FileStream into two*distinct classes, one for input and one for output.**Revision 1.6  2002/09/12 03:26:03  ddiego*merged over the changes from the devmain-0-5-5b branch**Revision 1.5.12.1  2002/08/06 02:57:35  ddiego*added base X11 files for GraphicsKit and made sure that the GraphicsKit compiles*under linux (GCC). There is now a new dir under build/xmake called GraphicsKit*where the xmake build script lives. This checkin also includes the base X11*include (as part of GraphicsKitPrivate.h), as well as linking to the X11 libs**Revision 1.5  2002/01/24 01:46:48  ddiego*added a cvs "log" comment to the top of all files in vcf/src and vcf/include*to facilitate change tracking**/#endif // _VCF_BASICSTROKE_H__

⌨️ 快捷键说明

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