當前位置: 首頁>>代碼示例>>C#>>正文


C# BufferChunk.NextByte方法代碼示例

本文整理匯總了C#中NewTOAPIA.BufferChunk.NextByte方法的典型用法代碼示例。如果您正苦於以下問題:C# BufferChunk.NextByte方法的具體用法?C# BufferChunk.NextByte怎麽用?C# BufferChunk.NextByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NewTOAPIA.BufferChunk的用法示例。


在下文中一共展示了BufferChunk.NextByte方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReceiveData


//.........這裏部分代碼省略.........
                    }
                    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();

                    int srcX = aRecord.NextInt32();
                    int srcY = aRecord.NextInt32();
                    int srcWidth = aRecord.NextInt32();
                    int srcHeight = aRecord.NextInt32();

                    byte alpha = aRecord.NextByte();

                    // Now create a pixbuff on the specified size
                    int buffWidth = aRecord.NextInt32();
                    int buffHeight = aRecord.NextInt32();
                    PixelBuffer pixBuff = new PixelBuffer(buffWidth, buffHeight);
                    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
                    OnAlphaBlend(x,y,width,height, pixBuff,srcX,srcY, srcWidth,srcHeight,alpha);
                }
                    break;

                case SpaceControlChannel.SC_ScaleBitmap:
                    break;

                case SpaceControlChannel.SC_None:
                default:
                    break;
            }
        }
開發者ID:Wiladams,項目名稱:NewTOAPIA,代碼行數:101,代碼來源:SpaceCommandDecoder.cs

示例2: ReceiveData


//.........這裏部分代碼省略.........
                {
                    Point[] points = UnpackPoints(aRecord);

                    //PolyLineTo(points);
                }
                break;

            case GDI32.EMR_POLYPOLYLINE:
                break;

            case GDI32.EMR_POLYTEXTOUTA:
            case GDI32.EMR_POLYTEXTOUTW:
                break;


            case GDI32.EMR_EXTTEXTOUTA:
            case GDI32.EMR_EXTTEXTOUTW:
                {
                    int x = aRecord.NextInt32();
                    int y = aRecord.NextInt32();
                    int strLength = aRecord.NextInt32();
                    string text = (string)aRecord;
                    DrawString(x, y, text);
                }
                break;

            case GDI32.EMR_EXTCREATEFONTINDIRECTW:
                {
                    LOGFONT newFont = new LOGFONT();

                    int faceNameLength = aRecord.NextInt32();
                    newFont.lfFaceName = aRecord.NextUtf8String(faceNameLength);
                    newFont.lfHeight = aRecord.NextInt32();
                    newFont.lfCharSet = aRecord.NextByte();
                    newFont.lfClipPrecision = aRecord.NextByte();
                    newFont.lfEscapement = aRecord.NextInt32();
                    newFont.lfItalic = aRecord.NextByte();
                    newFont.lfOrientation = aRecord.NextInt32();
                    newFont.lfOutPrecision = aRecord.NextByte();
                    newFont.lfPitchAndFamily = aRecord.NextByte();
                    newFont.lfQuality = aRecord.NextByte();
                    newFont.lfStrikeOut = aRecord.NextByte();
                    newFont.lfUnderline = aRecord.NextByte();
                    newFont.lfWeight = aRecord.NextInt32();
                    newFont.lfWidth = aRecord.NextInt32();

                    Guid uniqueID = this.UnpackGuid(aRecord);

                    CreateFont(newFont.lfFaceName, newFont.lfHeight, uniqueID);
                }
                break;


            case GDI32.EMR_CREATEMONOBRUSH:
            case GDI32.EMR_EXTCREATEPEN:
            case GDI32.EMR_CREATEDIBPATTERNBRUSHPT:
                break;

            case GDI32.EMR_FILLRGN:
            case GDI32.EMR_FRAMERGN:
            case GDI32.EMR_INVERTRGN:
            case GDI32.EMR_PAINTRGN:
            case GDI32.EMR_EXTSELECTCLIPRGN:
                break;

            case GDI32.EMR_ALPHABLEND:
開發者ID:Wiladams,項目名稱:NewTOAPIA,代碼行數:67,代碼來源:GraphPortChunkDecoder.cs


注:本文中的NewTOAPIA.BufferChunk.NextByte方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。