本文整理汇总了C#中NewTOAPIA.BufferChunk.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# BufferChunk.CopyTo方法的具体用法?C# BufferChunk.CopyTo怎么用?C# BufferChunk.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewTOAPIA.BufferChunk
的用法示例。
在下文中一共展示了BufferChunk.CopyTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReceiveData
public virtual void ReceiveData(BufferChunk aRecord)
{
// First read out the record type
int recordType = aRecord.NextInt32();
Console.WriteLine("SpaceCommandDecoder.ReceiveData: {0}", recordType);
switch (recordType)
{
case SpaceControlChannel.SC_CreateSurface:
{
Guid uniqueID = CodecUtils.UnpackGuid(aRecord);
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
OnCreateSurface("title",new RECT(x,y,width,height), uniqueID);
}
break;
case SpaceControlChannel.SC_InvalidateSurfaceRect:
{
Guid uniqueID = CodecUtils.UnpackGuid(aRecord);
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
OnInvalidateSurfaceRect(uniqueID, new RECT(x, y, width, height));
}
break;
case SpaceControlChannel.SC_MouseEvent:
{
Guid sourceID = CodecUtils.UnpackGuid(aRecord);
uint mouseID = aRecord.NextUInt32();
MouseEventType eventType = (MouseEventType)aRecord.NextInt32();
MouseButtons buttons = (MouseButtons)aRecord.NextInt32();
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int clicks = aRecord.NextInt32();
int delta = aRecord.NextInt32();
MouseEventArgs args = new MouseEventArgs(mouseID, eventType, buttons, clicks, x, y, delta, sourceID);
OnMouseActivity(this, args);
}
break;
case SpaceControlChannel.SC_KeyboardEvent:
break;
//case SpaceControlChannel.SC_BitBlt:
// {
// // Get the X, Y
// int x = aRecord.NextInt32();
// int y = aRecord.NextInt32();
// int width = aRecord.NextInt32();
// int height = aRecord.NextInt32();
// // Now create a pixbuff on the specified size
// PixelBuffer pixBuff = new PixelBuffer(width, height);
// int dataSize = aRecord.NextInt32();
// // Copy the received data into it right pixel data pointer
// aRecord.CopyTo(pixBuff.Pixels.Data, dataSize);
// // And finally, call the BitBlt function
// OnBitBlt(x,y,pixBuff);
//}
// break;
case SpaceControlChannel.SC_CopyPixels:
{
// Get the X, Y
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
// Now create a pixbuff on the specified size
PixelBuffer pixBuff = new PixelBuffer(width, height);
int dataSize = aRecord.NextInt32();
// Copy the received data into it right pixel data pointer
aRecord.CopyTo(pixBuff.Pixels.Data, dataSize);
// And finally, call the BitBlt function
OnCopyPixels(x, y, width, height, pixBuff);
}
break;
case SpaceControlChannel.SC_AlphaBlend:
{
// Get the X, Y
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
//.........这里部分代码省略.........
示例2: ReceiveData
//.........这里部分代码省略.........
break;
case GDI32.EMR_STROKEANDFILLPATH:
DrawPath();
break;
case GDI32.EMR_STROKEPATH:
FramePath();
break;
case GDI32.EMR_ABORTPATH:
case GDI32.EMR_FLATTENPATH:
case GDI32.EMR_WIDENPATH:
break;
case GDI32.EMR_CLOSEFIGURE:
case GDI32.EMR_SELECTCLIPPATH:
break;
case GDI32.EMR_BITBLT:
{
// Get the X, Y
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
// Now create a pixbuff on the specified size
PixelBuffer pixBuff = new PixelBuffer(width, height);
int dataSize = aRecord.NextInt32();
// Copy the received data into it right pixel data pointer
aRecord.CopyTo(pixBuff.Pixels.Data, dataSize);
// And finally, call the BitBlt function
BitBlt(x,y,pixBuff);
}
break;
case GDI32.EMR_POLYBEZIERTO:
break;
case GDI32.EMR_POLYBEZIER:
{
Point[] points = UnpackPoints(aRecord);
// Now we have everything, so call the call
PolyBezier(points);
}
break;
case GDI32.EMR_POLYGON:
{
Point[] points = UnpackPoints(aRecord);
// Now we have everything, so call the call
Polygon(points);
}
break;
case GDI32.EMR_POLYPOLYGON:
break;