本文整理汇总了C#中IImage.GetPixelPointerXY方法的典型用法代码示例。如果您正苦于以下问题:C# IImage.GetPixelPointerXY方法的具体用法?C# IImage.GetPixelPointerXY怎么用?C# IImage.GetPixelPointerXY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IImage
的用法示例。
在下文中一共展示了IImage.GetPixelPointerXY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BlendInFilterPixel
private void BlendInFilterPixel(int[] accumulatedColor, int back_r, int back_g, int back_b, int back_a, IImage SourceRenderingBuffer, int maxx, int maxy, int x_lr, int y_lr, int weight)
{
byte[] fg_ptr;
unchecked
{
if ((uint)x_lr <= (uint)maxx && (uint)y_lr <= (uint)maxy)
{
int bufferIndex;
fg_ptr = SourceRenderingBuffer.GetPixelPointerXY(x_lr, y_lr, out bufferIndex);
accumulatedColor[0] += weight * fg_ptr[bufferIndex + ImageBuffer.OrderR];
accumulatedColor[1] += weight * fg_ptr[bufferIndex + ImageBuffer.OrderG];
accumulatedColor[2] += weight * fg_ptr[bufferIndex + ImageBuffer.OrderB];
accumulatedColor[3] += weight * fg_ptr[bufferIndex + ImageBuffer.OrderA];
}
else
{
accumulatedColor[0] += back_r * weight;
accumulatedColor[1] += back_g * weight;
accumulatedColor[2] += back_b * weight;
accumulatedColor[3] += back_a * weight;
}
}
}