当前位置: 首页>>代码示例>>C#>>正文


C# BufferChunk.NextUInt32方法代码示例

本文整理汇总了C#中NewTOAPIA.BufferChunk.NextUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# BufferChunk.NextUInt32方法的具体用法?C# BufferChunk.NextUInt32怎么用?C# BufferChunk.NextUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NewTOAPIA.BufferChunk的用法示例。


在下文中一共展示了BufferChunk.NextUInt32方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UnpackGRADIENT_RECT

    GRADIENT_RECT[] UnpackGRADIENT_RECT(BufferChunk chunk)
    {
        int nRects = chunk.NextInt32();

        GRADIENT_RECT[] pMesh = new GRADIENT_RECT[nRects];

        for (int i = 0; i < nRects; i++)
        {
            pMesh[i].UpperLeft = chunk.NextUInt32();
            pMesh[i].LowerRight = chunk.NextUInt32();
        }

        return pMesh;
    }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:14,代码来源:GraphPortChunkDecoder.cs

示例2: 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();
//.........这里部分代码省略.........
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:101,代码来源:SpaceCommandDecoder.cs

示例3: ReceiveData

    public virtual void ReceiveData(BufferChunk aRecord)
    {
        // First read out the record type
        int recordType = aRecord.NextInt32();

        // Then deserialize the rest from there
        switch (recordType)
        {
            case GDI32.EMR_HEADER:
                break;

            // Transform related
            case GDI32.EMR_SCALEVIEWPORTEXTEX:
            case GDI32.EMR_SCALEWINDOWEXTEX:
                break;

            case GDI32.EMR_SETWINDOWEXTEX:
                {
                    int width = aRecord.NextInt32();
                    int height = aRecord.NextInt32();

                    SetWindowExtent(width, height);
                }
                break;

            case GDI32.EMR_SETWINDOWORGEX:
                {
                    int x = aRecord.NextInt32();
                    int y = aRecord.NextInt32();

                    SetWindowOrigin(x, y);
                }
                break;

            case GDI32.EMR_SETVIEWPORTEXTEX:
                {
                    int width = aRecord.NextInt32();
                    int height = aRecord.NextInt32();

                    SetViewportExtent(width, height);
                }
                break;

            case GDI32.EMR_SETVIEWPORTORGEX:
                {
                    int x = aRecord.NextInt32();
                    int y = aRecord.NextInt32();
                    
                    SetViewportOrigin(x, y);
                }
                break;

            case GDI32.EMR_SETWORLDTRANSFORM:
            case GDI32.EMR_MODIFYWORLDTRANSFORM:
                break;

            case GDI32.EMR_SETBRUSHORGEX:
                break;

            case GDI32.EMR_EOF:
                Flush();
                break;

            case GDI32.EMR_SETPIXELV:
                {
                    int x = aRecord.NextInt32();
                    int y = aRecord.NextInt32();
                    UInt32 colorref = aRecord.NextUInt32();

                    SetPixel(x, y, colorref);
                }
                break;

            case GDI32.EMR_SETMAPPERFLAGS:
                break;

            case GDI32.EMR_SETPOLYFILLMODE:
                SetPolyFillMode(aRecord.NextInt32());
                break;

            case GDI32.EMR_SETSTRETCHBLTMODE:
                break;

            case GDI32.EMR_SETMAPMODE:
                MappingModes aMode = (MappingModes)aRecord.NextInt32();
                SetMappingMode(aMode);
                break;


            case GDI32.EMR_SETTEXTCOLOR:
                SetTextColor(aRecord.NextUInt32());
                break;

            case GDI32.EMR_SETBKCOLOR:
                SetBkColor(aRecord.NextUInt32());
                break;

            case GDI32.EMR_SETDCBRUSHCOLOR:
                SetDefaultBrushColor(aRecord.NextUInt32());
                break;
//.........这里部分代码省略.........
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:101,代码来源:GraphPortChunkDecoder.cs

示例4: UnpackGPen

        public static GDIPen UnpackGPen(BufferChunk chunk)
        {
            uint penColor;
            PenStyle penStyle;
            Guid uniqueID;
            int penSize;

            penStyle = (PenStyle)chunk.NextInt32();
            penSize = chunk.NextInt32();
            penColor = chunk.NextUInt32();
            uniqueID = UnpackGuid(chunk);

            GDIPen aPen = new GDIPen(PenType.Cosmetic, PenStyle.Solid, PenJoinStyle.Round, PenEndCap.Round, penColor, penSize, uniqueID);
            return aPen;            
        }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:15,代码来源:ChunkUtils.cs


注:本文中的NewTOAPIA.BufferChunk.NextUInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。