📄 type_gimage.html
字号:
<html><head><title>Generated Documentation</title></head><body> <image src="headerimage.png"> <br><br><table><tr><td><big><big><big style="font-family: arial;"><b>GImage</b></big></big></big><br><br></td><td> Represents an image</td></tr></table><br><br><big><big><i>Constructors (public)</i></big></big><br><div style="margin-left: 40px;"><big><b>GImage</b></big>()<br></div><br><big><big><i>Destructors</i></big></big><br><div style="margin-left: 40px;"><big><b>~GImage</b></big>()<br></div><br><big><big><i>Public</i></big></big><br><div style="margin-left: 40px;">void <big><b>AlphaBlit</b></big>(int x, int y, <a href="type_GImage.html">GImage</a>* pSource, <a href="type_GRect.html">GRect</a>* pSourceRect)<br><div style="margin-left: 80px;"><font color=brown> Blit an image into this image. The source rect must be within the source image. The dest area can be out of the dest image. Also performs alpha blending.</font></div><br>void <big><b>Blit</b></big>(unsigned int x, int y, <a href="type_GImage.html">GImage</a>* pSource, <a href="type_GRect.html">GRect</a>* pSourceRect)<br><div style="margin-left: 80px;"><font color=brown> Blit an image into this image. The source rect must be within the source image. The dest area can be out of the dest image. The alpha channel is ignored.</font></div><br>void <big><b>Blur</b></big>(double dFactor)<br><div style="margin-left: 80px;"><font color=brown> Blur the image</font></div><br>void <big><b>BoundaryFill</b></big>(int nX, int nY, unsigned char nBoundaryR, unsigned char nBoundaryG, unsigned char nBoundaryB, unsigned char nFillR, unsigned char nFillG, unsigned char nFillB, int nTolerance)<br><div style="margin-left: 80px;"><font color=brown> Tolerant boundary fill</font></div><br>void <big><b>Clear</b></big>(int color)<br><div style="margin-left: 80px;"><font color=brown> Fill the entire image with a single color</font></div><br>void <big><b>ConvertToGrayScale</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Converts the image to gray scale</font></div><br>void <big><b>Convolve</b></big>(<a href="type_GImage.html">GImage</a>* pKernel)<br>void <big><b>ConvolveKernel</b></big>(<a href="type_GImage.html">GImage</a>* pKernel)<br>void <big><b>CopyImage</b></big>(<a href="type_GImage.html">GImage</a>* pSourceImage)<br>void <big><b>CopyImage</b></big>(<a href="type_GImage.html">GImage</a>* pSourceImage, int nLeft, int nTop, int nRight, int nBottom)<br>int <big><b>CountHardTextChars</b></big>(int horizArea, int height, const char* szText, float width)<br><div style="margin-left: 80px;"><font color=brown> Counts the number of characters that can be printed in the given horizArea</font></div><br>void <big><b>CreateBrightnessHistogram</b></big>(<a href="type_GImage.html">GImage</a>* pOutImage)<br><div style="margin-left: 80px;"><font color=brown> Analysis Tools</font></div><br>bool <big><b>Crop</b></big>(int nLeft, int nTop, int nRight, int nBottom)<br><div style="margin-left: 80px;"><font color=brown> Crop. You can crop bigger by using values outside the picture</font></div><br>void <big><b>DrawBox</b></big>(int nX1, int nY1, int nX2, int nY2, int color, bool bFill)<br><div style="margin-left: 80px;"><font color=brown> Draw a box</font></div><br>void <big><b>DrawCircle</b></big>(int nX, int nY, float dRadius, int color)<br><div style="margin-left: 80px;"><font color=brown> Draw a circle</font></div><br>void <big><b>DrawEllipse</b></big>(int nX, int nY, double dRadius, double dHeightToWidthRatio, int color)<br><div style="margin-left: 80px;"><font color=brown> Draw an ellipse</font></div><br>void <big><b>DrawHardText</b></big>(<a href="type_GRect.html">GRect</a>* pRect, const char* szText, int col, float width)<br><div style="margin-left: 80px;"><font color=brown> Draws some text (using a built-in hard-coded font)</font></div><br>void <big><b>DrawLine</b></big>(int nX1, int nY1, int nX2, int nY2, int color)<br><div style="margin-left: 80px;"><font color=brown> Draw a line</font></div><br>void <big><b>DrawLineAntiAlias</b></big>(int nX1, int nY1, int nX2, int nY2, int color)<br><div style="margin-left: 80px;"><font color=brown> Draw an anti-aliassed line</font></div><br>void <big><b>DrawPolygon</b></big>(int nPoints, int* pnPointArray, int color)<br><div style="margin-left: 80px;"><font color=brown> Draws a polygon</font></div><br>void <big><b>EqualizeColorSpread</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Equalizes the color histogram</font></div><br>void <big><b>FillTriangle</b></big>(int x1, int y1, int x2, int y2, int x3, int y3, int c)<br><div style="margin-left: 80px;"><font color=brown> Draws a filled-in triangle</font></div><br>void <big><b>FlipHorizontally</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Flip the image horizontally</font></div><br>void <big><b>FlipVertically</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Flip the image vertically</font></div><br>void <big><b>FloodFill</b></big>(int nX, int nY, int color, int nTolerance)<br><div style="margin-left: 80px;"><font color=brown> Tolerant flood fill</font></div><br>int <big><b>GetHeight</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Returns the height of the image in pixels</font></div><br>int <big><b>GetPixel</b></big>(int nX, int nY)<br><div style="margin-left: 80px;"><font color=brown> Get a pixel</font></div><br>int <big><b>GetRGBQuads</b></big>()<br>int <big><b>GetWidth</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Returns the width of the image in pixels</font></div><br>void <big><b>HorizDifferenceize</b></big>()<br>void <big><b>HorizSummize</b></big>()<br>int <big><b>InterpolatePixel</b></big>(float dX, float dY)<br><div style="margin-left: 80px;"><font color=brown> Returns an interpolated pixel</font></div><br>void <big><b>Invert</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Inverts the pixels in the image</font></div><br>void <big><b>InvertRect</b></big>(<a href="type_GRect.html">GRect</a>* pRect)<br><div style="margin-left: 80px;"><font color=brown> Inverts the pixels in a particular rect</font></div><br>bool <big><b>LoadBMPFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Load the image from a BMP file</font></div><br>bool <big><b>LoadBMPFile</b></big>(const unsigned char* pRawData, int nLen)<br><div style="margin-left: 80px;"><font color=brown> Load the image from a BMP raw data</font></div><br>bool <big><b>LoadFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Load a file (determines the format from the extension--doesn't handle incorrect extensions)</font></div><br>bool <big><b>LoadPGMFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Load the image from a PGM file</font></div><br>bool <big><b>LoadPIGFile</b></big>(const unsigned char* pBytes, int nSize)<br><div style="margin-left: 80px;"><font color=brown> Save the image from a PIG file</font></div><br>bool <big><b>LoadPNGFile</b></big>(const unsigned char* pRawData, int nBytes)<br><div style="margin-left: 80px;"><font color=brown> Load the image from a PNG as raw data</font></div><br>bool <big><b>LoadPNGFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Load the image from a PNG file</font></div><br>bool <big><b>LoadPPMFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Save the image from a PPM file</font></div><br>void <big><b>LocallyEqualizeColorSpread</b></big>(int nLocalSize, float fExtent)<br><div style="margin-left: 80px;"><font color=brown> Locally equalize the color histogram</font></div><br>void <big><b>MakeEdgesGlow</b></big>(float fThresh, int nThickness, int nOpacity, int color)<br><div style="margin-left: 80px;"><font color=brown> Finds edges and makes them glow</font></div><br>int <big><b>MeasureHardTextWidth</b></big>(int height, const char* szText, float width)<br><div style="margin-left: 80px;"><font color=brown> Determines how many pixels of width are required to print a line of text</font></div><br><a href="type_GImage.html">GImage</a>* <big><b>Munge</b></big>(int* nStyle, float fExtent)<br><div style="margin-left: 80px;"><font color=brown> Munges the image. nStyle should be 0, 1, 2, or 3. Each value munges a different way. fExtent should be between 0 and 1, where 0 doesn't change much and 1 totally munges it. You're responsible to delete the munged image this returns</font></div><br>void <big><b>PasteImage</b></big>(int nX, int nY, <a href="type_GImage.html">GImage</a>* pSourceImage, int colTransparent)<br>void <big><b>PasteImage</b></big>(int nX, int nY, <a href="type_GImage.html">GImage</a>* pSourceImage)<br>void <big><b>Rotate</b></big>(<a href="type_GImage.html">GImage</a>* pSourceImage, int nX, int nY, double dAngle)<br><div style="margin-left: 80px;"><font color=brown> Rotate the image around the specified point</font></div><br>void <big><b>SafeDrawLine</b></big>(int nX1, int nY1, int nX2, int nY2, int color)<br><div style="margin-left: 80px;"><font color=brown> Draw a line (may include parts outside the bounds of the image)</font></div><br>int <big><b>SafeGetPixel</b></big>(int nX, int nY)<br><div style="margin-left: 80px;"><font color=brown> Get a pixel (may be out of range of the image)</font></div><br>void <big><b>SafeSetPixel</b></big>(int nX, int nY, int color)<br><div style="margin-left: 80px;"><font color=brown> Set a pixel (may be out of range of the image)</font></div><br>bool <big><b>SaveBMPFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Save the image to a BMP file</font></div><br>bool <big><b>SavePGMFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Save the image to a PGM file</font></div><br>bool <big><b>SavePIGFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Save the image to a PIG file</font></div><br>bool <big><b>SavePPMFile</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Save the image to a PPM file</font></div><br>void <big><b>Scale</b></big>(unsigned int nNewWidth, unsigned int nNewHeight)<br><div style="margin-left: 80px;"><font color=brown> Scale the image</font></div><br>void <big><b>SetPixel</b></big>(int nX, int nY, int color)<br><div style="margin-left: 80px;"><font color=brown> Save the image as a PNG to a stream Save the image as a PNG to a file Drawing Primitives</font></div><br>void <big><b>SetSize</b></big>(int nWidth, int nHeight)<br><div style="margin-left: 80px;"><font color=brown> Erase the image and resize it</font></div><br>void <big><b>Sharpen</b></big>(double dFactor)<br><div style="margin-left: 80px;"><font color=brown> Sharpen the image</font></div><br>void <big><b>SoftDrawBox</b></big>(int nX1, int nY1, int nX2, int nY2, int color, double dOpacity)<br><div style="margin-left: 80px;"><font color=brown> Draw a translucent box</font></div><br>void <big><b>SoftSetPixel</b></big>(int nX, int nY, int color, double dOpacity)<br><div style="margin-left: 80px;"><font color=brown> Draw a translucent pixel</font></div><br>void <big><b>SwapData</b></big>(<a href="type_GImage.html">GImage</a>* pSwapImage)<br></div><br><big><big><i>Protected</i></big></big><br><div style="margin-left: 40px;">void <big><b>FloodFillRecurser</b></big>(int nX, int nY, unsigned char nSrcR, unsigned char nSrcG, unsigned char nSrcB, unsigned char nDstR, unsigned char nDstG, unsigned char nDstB, int nTolerance)<br></div><br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -