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

📄 image.h

📁 这是VCF框架的代码
💻 H
📖 第 1 页 / 共 2 页
字号:
			greenVal = (pixelColor &amp; 0x00FF0000) &gt;&gt; 16;			blueVal = (pixelColor &amp; 0x0000FF00) &gt;&gt; 8;			alphaVal = (pixelColor &amp; 0x000000FF);		\endcode				\li  Image::ploBGRA - indicates the Blue value is in the MSB position, followed		by Green, Red and finally Alpha values. In code it might look like this for an		Image with integer based 8 bit color channels		\code			ulong32 pixelColor = (blueVal &lt;&lt; 24) | (greenVal &lt;&lt; 16) | (redVal &lt;&lt; 8) | (alphaVal);		\endcode		Extracting the values from a single pixel color would be:		\code			blueVal	= (pixelColor &amp; 0xFF000000) &gt;&gt; 24;			greenVal = (pixelColor &amp; 0x00FF0000) &gt;&gt; 16;			redVal = (pixelColor &amp; 0x0000FF00) &gt;&gt; 8;			alphaVal = (pixelColor &amp; 0x000000FF);		\endcode				\li  Image::ploARGB - indicates the Alpha value is in the MSB position, followed		by Red, Green and finally Blue values. In code it might look like this for an		Image with integer based 8 bit color channels		\code			ulong32 pixelColor = (alphaVal &lt;&lt; 24) | (redVal &lt;&lt; 16) | (greenVal &lt;&lt; 8) | (blueVal);		\endcode		Extracting the values from a single pixel color would be:		\code			alphaVal	= (pixelColor &amp; 0xFF000000) &gt;&gt; 24;			redVal = (pixelColor &amp; 0x00FF0000) &gt;&gt; 16;			greenVal = (pixelColor &amp; 0x0000FF00) &gt;&gt; 8;			blueVal = (pixelColor &amp; 0x000000FF);		\endcode		This is typically the way it would be stored on a linux based port of VCF.				\li  Image::ploABGR - indicates the Alpha value is in the MSB position, followed		by Blue, Green and finally Red values. In code it might look like this for an		Image with integer based 8 bit color channels		\code			ulong32 pixelColor = (alphaVal &lt;&lt; 24) | (blueVal &lt;&lt; 16) | (greenVal &lt;&lt; 8) | (redVal);		\endcode		Extracting the values from a single pixel color would be:		\code			alphaVal	= (pixelColor &amp; 0xFF000000) &gt;&gt; 24;			blueVal = (pixelColor &amp; 0x00FF0000) &gt;&gt; 16;			greenVal = (pixelColor &amp; 0x0000FF00) &gt;&gt; 8;			redVal = (pixelColor &amp; 0x000000FF);		\endcode		This is typically the way it would be stored on a Win32 based port of VCF.					*/	virtual PixelLayoutOrder getPixelLayoutOrder() const = 0;    virtual void setSize( const unsigned long & width, const unsigned long & height )=0;    virtual unsigned long getWidth()=0;    virtual unsigned long getHeight()=0;    virtual void addImageSizeChangedHandler( EventHandler* handler ) = 0;    virtual void removeImageSizeChangedHandler( EventHandler* handler ) = 0;	virtual ImageBits* getImageBits() = 0;	/**	Call this method before calling getImageContext() to "lock" the	images pixels and ensure that the GraphicsContext returns is properly	sycnhed with the image's data.	*/	virtual void beginDrawing() = 0;	virtual void finishedDrawing() = 0;	/**	This retreives a graphics context for drawing on. Any drawing performed	on the graphics context will be reflected in the internal pixel data of the	image. On some platforms this may be "instantaneous" because the pixel	data of the image is directly linked to the GraphicsContext (i.e. Win32),	while on other platforms the drawing on the GraphicsContext needs to	be "flushed" back to the images pixels. Because of this, you <b>must</b>	call beginDrawing() <i>before</i> calling getImageContext(), and call	finishedDrawing() when you're done with the GraphicsContext. Concrete	implemententations of this class will transfer the image's contents to	the GraphicsContext for beginDrawing(), finishedDrawing() will update	the image's data due to any changes in the GraphicsContext. An example:	\code	Image* image = getImage(); //get an image from somewhere	image->beginDrawing();	GraphicsContext* gc = image->getImageContext();	gc->rectangle( 20, 20, 400, 60 );	gc->strokePath();	image->finishedDrawing();	\endcode	*/	virtual GraphicsContext* getImageContext() = 0;	/**	*returns the color that is used to blend with the contents of	*a GraphicsContext when the Image is drawn. Only used when the	*Image is set to Transparent	*/	virtual Color* getTransparencyColor() = 0;	virtual void setTransparencyColor( Color* transparencyColor ) = 0;	/**	*Indicates whether or not the Image is using a transparent	*color.	*@return bool if this is true then the Image is transparent	*and the contents of the underlying GraphicsContext will show through	*wherever a pixel in the image is found that is the transparency color	*/	virtual bool isTransparent() = 0;	virtual void setIsTransparent( const bool& transparent ) = 0;	virtual void* getData() = 0;};};/***CVS Log info*$Log$*Revision 1.5  2006/04/07 02:35:41  ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.4.2.3  2006/03/26 22:37:35  ddiego*minor update to source docs.**Revision 1.4.2.2  2006/03/12 22:42:08  ddiego*more doc updates - specific to graphicskit.**Revision 1.4.2.1  2005/10/11 00:54:51  ddiego*added initial changes for grayscale image support. fixed some minor changes to form loading and creating.**Revision 1.4  2005/07/18 03:54:19  ddiego*documentation updates.**Revision 1.3  2004/12/02 04:11:10  ddiego*removed some old, extraneous files from graphics kit dir.**Revision 1.2  2004/08/07 02:49:17  ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.2  2004/04/29 04:10:27  marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.1  2004/04/28 03:40:31  ddiego*migration towards new directory structure**Revision 1.12.4.1  2004/04/26 21:58:39  marcelloptr*changes for dir reorganization: _VCF_MACRO_H__**Revision 1.12  2003/12/18 05:15:58  ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.11.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.11  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.10.2.2  2003/06/16 03:09:39  ddiego*beginning to add support for AGG into the VCF GraphicsKit*added some missing files*added some changes to the new version of xmake**Revision 1.10.2.1  2003/05/25 19:07:10  ddiego*fixed bug [ 524878 ] onDropped not called for MLTcontrol. This*was due to errors in the drag-drop implementation for WIn32 and is*now fixed.*Also cleaned up the drag-drop implementation and moved/deleted a number of*irrelevant files for COM support. The vcf/include/com and vcf/src/COM*directories are now gotten rid of.**Revision 1.10  2003/05/18 23:09:37  ddiego*fixes some mistakes in the docs/Makefile and adds some extra documentation.**Revision 1.9  2003/05/17 20:37:10  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.8.10.2  2003/04/07 03:39:30  ddiego*did some documentation work, and got everything to compile cleanly with some*of the new additions, particularly the chnages inteh Image/ImageBits classes.**Revision 1.8.10.1  2003/03/23 03:23:48  marcelloptr*3 empty lines at the end of the files**Revision 1.8  2002/09/12 03:26:04  ddiego*merged over the changes from the devmain-0-5-5b branch**Revision 1.7.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.7  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_IMAGE_H__

⌨️ 快捷键说明

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