📄 classpcolourconverter.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PColourConverter class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PColourConverter Class Reference</h1><code>#include <<a class="el" href="vconvert_8h-source.html">vconvert.h</a>></code><p><p>Inheritance diagram for PColourConverter:<p><center><img src="classPColourConverter.png" usemap="#PColourConverter_map" border="0" alt=""></center><map name="PColourConverter_map"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,115,24"><area href="classPSynonymColour.html" alt="PSynonymColour" shape="rect" coords="0,112,115,136"></map><a href="classPColourConverter-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPColourConverter.html#a0">PColourConverter</a> (const <a class="el" href="classPString.html">PString</a> &<a class="el" href="classPColourConverter.html#n0">srcColourFormat</a>, const <a class="el" href="classPString.html">PString</a> &<a class="el" href="classPColourConverter.html#n1">dstColourFormat</a>, unsigned width, unsigned height)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a1">GetVFlipState</a> ()</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPColourConverter.html#a2">SetVFlipState</a> (BOOL vFlipState)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a3">SetFrameSize</a> (unsigned width, unsigned height)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a4">SetSrcFrameSize</a> (unsigned width, unsigned height)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a5">SetDstFrameSize</a> (unsigned width, unsigned height, BOOL bScale)</td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classPString.html">PString</a> & </td><td valign=bottom><a class="el" href="classPColourConverter.html#a6">GetSrcColourFormat</a> ()</td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classPString.html">PString</a> & </td><td valign=bottom><a class="el" href="classPColourConverter.html#a7">GetDstColourFormat</a> ()</td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPColourConverter.html#a8">GetMaxSrcFrameBytes</a> ()</td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPColourConverter.html#a9">GetMaxDstFrameBytes</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a10">Convert</a> (const BYTE *srcFrameBuffer, BYTE *dstFrameBuffer, PINDEX *bytesReturned=NULL)=0</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a11">ConvertInPlace</a> (BYTE *frameBuffer, PINDEX *bytesReturned=NULL, BOOL noIntermediateFrame=FALSE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a12">GetDstFrameSize</a> (unsigned &width, unsigned &height) const</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#a13">GetSrcFrameSize</a> (unsigned &width, unsigned &height) const</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>PColourConverter * </td><td valign=bottom><a class="el" href="classPColourConverter.html#d0">Create</a> (const <a class="el" href="classPString.html">PString</a> &<a class="el" href="classPColourConverter.html#n0">srcColourFormat</a>, const <a class="el" href="classPString.html">PString</a> &<a class="el" href="classPColourConverter.html#n1">dstColourFormat</a>, unsigned width, unsigned height)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPColourConverter.html#n0">srcColourFormat</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPColourConverter.html#n1">dstColourFormat</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n2">srcFrameWidth</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n3">srcFrameHeight</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n4">srcFrameBytes</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n5">dstFrameBytes</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n6">dstFrameWidth</a></td></tr><tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="classPColourConverter.html#n7">dstFrameHeight</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#n8">scaleNotCrop</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPColourConverter.html#n9">doVFlip</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPBYTEArray.html">PBYTEArray</a> </td><td valign=bottom><a class="el" href="classPColourConverter.html#n10">intermediateFrameStore</a></td></tr><tr><td colspan=2><br><h2>Friends</h2></td></tr><tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classPColourConverter.html#l0">PColourConverterRegistration</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class defines a means to convert an image from one colour format to another. It is an ancestor class for the individual formatting functions. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PColourConverter::PColourConverter"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PColourConverter::PColourConverter </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>srcColourFormat</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>dstColourFormat</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned </td> <td class="mdname" nowrap> <em>width</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned </td> <td class="mdname" nowrap> <em>height</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new converter. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dstColourFormat</em> </td><td>Name of source colour format </td></tr><tr><td valign=top><em>width</em> </td><td>Name of destination colour format </td></tr><tr><td valign=top><em>height</em> </td><td>Width of frame Height of frame </td></tr></table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a10" doxytag="PColourConverter::Convert"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PColourConverter::Convert </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const BYTE * </td> <td class="mdname" nowrap> <em>srcFrameBuffer</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BYTE * </td> <td class="mdname" nowrap> <em>dstFrameBuffer</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX * </td> <td class="mdname" nowrap> <em>bytesReturned</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Convert from one colour format to another. This version will copy the data from one frame buffer to another. An implementation of this function should allow for the case of where srcFrameBuffer and dstFrameBuffer are the same, if the conversion algorithm allows for that to occur without an intermediate frame store.<p>The function should return FALSE if srcFrameBuffer and dstFrameBuffer are the same and that form pf conversion is not allowed <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dstFrameBuffer</em> </td><td>Frame store for source pixels </td></tr><tr><td valign=top><em>bytesReturned</em> </td><td>Frame store for destination pixels Bytes written to dstFrameBuffer </td></tr></table></dl><p>Implemented in <a class="el" href="classPSynonymColour.html#a1">PSynonymColour</a>. </td> </tr></table><a name="a11" doxytag="PColourConverter::ConvertInPlace"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PColourConverter::ConvertInPlace </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">BYTE * </td> <td class="mdname" nowrap> <em>frameBuffer</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX * </td> <td class="mdname" nowrap> <em>bytesReturned</em> = NULL, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>noIntermediateFrame</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Convert from one colour format to another. This version will copy the data from one frame buffer to the same frame buffer. Not all conversions can do this so an intermediate store and copy may be required. If the noIntermediateFrame parameter is TRUE and the conversion cannot be done in place then the function returns FALSE. If the in place conversion can be done then that parameter is ignored.<p>Note that the frame should be large enough to take the destination pixels.<p>Default behaviour calls <a class="el" href="classPColourConverter.html#a10">Convert()</a> from the frameBuffer to itself, and if that returns FALSE then calls it again (provided noIntermediateFrame is FALSE) using an intermediate store, copying the intermediate store back to the original frame store. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>bytesReturned</em> </td><td>Frame buffer to translate data </td></tr><tr><td valign=top><em>noIntermediateFrame</em> </td><td>Bytes written to frameBuffer Flag to use intermediate store </td></tr></table></dl> </td> </tr></table><a name="d0" doxytag="PColourConverter::Create"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PColourConverter* PColourConverter::Create </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>srcColourFormat</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>dstColourFormat</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned </td> <td class="mdname" nowrap> <em>width</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned </td> <td class="mdname" nowrap> <em>height</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create an instance of a colour conversion function. Returns NULL if there is no registered colour converter between the two named formats. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dstColourFormat</em> </td><td>Name of source colour format </td></tr><tr><td valign=top><em>width</em> </td><td>Name of destination colour format </td></tr><tr><td valign=top><em>height</em> </td><td>Width of frame (used for both src and dst) Height of frame (used for both src and dst) </td></tr></table></dl> </td> </tr></table><a name="a7" doxytag="PColourConverter::GetDstColourFormat"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> const <a class="el" href="classPString.html">PString</a>& PColourConverter::GetDstColourFormat </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the destination colour format. </td> </tr></table><a name="a12" doxytag="PColourConverter::GetDstFrameSize"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> BOOL PColourConverter::GetDstFrameSize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned & </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -