IIXC_Page::GetPixel Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IIXC_Page::GetPixel Method}}
 
{{#customTitle:IIXC_Page::GetPixel Method}}
{{#parentPage:PXV:IIXC_Page|GetPixel Method|method}}
+
{{#parentPage:PXV:IIXC_Page#Methods|GetPixel|method}}
{{ToWrite}}
+
{{ToReview}}
+
  
The method of interface of PDF-XChange Editor SDK.
+
The method retrieves the color value of the pixel at the specified coordinates.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT GetPixel([in]          LONG    ptX,
+
<pre class="brush:cpp;gutter:false">HRESULT GetPixel([in]          LONG    nX,
                 [in]          LONG    ptY,
+
                 [in]          LONG    nY,
                 [out, retval]  ULONG*  pColor);</pre>
+
                 [out, retval]  ULONG*  nColor);</pre>
  
 
== Parameters ==
 
== Parameters ==
;ptX
+
;nX
:[in]  Value of LONG.
+
:[in]  Specifies x-coordinate of the pixel to be examined.
;ptY
+
;nY
:[in]  Value of LONG.
+
:[in]  Specifies y-coordinate of the pixel to be examined.
;pColor
+
;nColor
:[out, retval]  Pointer to ULONG.
+
:[out, retval]  Pointer to ULONG variable which will receive the color of the pixel. This parameter cannot be NULL.
  
 
== Return Value ==
 
== Return Value ==
 
Returns S_OK if operation was successful or error code in other cases.
 
Returns S_OK if operation was successful or error code in other cases.
 +
 +
== Remarks ==
 +
For all raster internal formats, the function returns the red, green, and blue components of the pixel's color. If the page has an alpha channel (Gray with Alpha, or TrueColor with Alpha), the high-order byte of the color will contain the value of the specified pixel's alpha channel. For indexed images, the high-order byte will contain the page palette index of the pixel's color.
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IIXC_Page|IIXC_Page]].
+
[[PXV:IIXC_Page|IIXC_Page]]

Latest revision as of 02:16, 15 June 2015

The method retrieves the color value of the pixel at the specified coordinates.

Syntax

HRESULT GetPixel([in]           LONG    nX,
                 [in]           LONG    nY,
                 [out, retval]  ULONG*  nColor);

Parameters

nX
[in] Specifies x-coordinate of the pixel to be examined.
nY
[in] Specifies y-coordinate of the pixel to be examined.
nColor
[out, retval] Pointer to ULONG variable which will receive the color of the pixel. This parameter cannot be NULL.

Return Value

Returns S_OK if operation was successful or error code in other cases.

Remarks

For all raster internal formats, the function returns the red, green, and blue components of the pixel's color. If the page has an alpha channel (Gray with Alpha, or TrueColor with Alpha), the high-order byte of the color will contain the value of the specified pixel's alpha channel. For indexed images, the high-order byte will contain the page palette index of the pixel's color.

See Also

IIXC_Page