예제 #1
0
        public void RegisterInterface(IPrimaryUpdate iPrimary)
        {
            DstBlt            = new DstBltDelegate(iPrimary.DstBlt);
            PatBlt            = new PatBltDelegate(iPrimary.PatBlt);
            ScrBlt            = new ScrBltDelegate(iPrimary.ScrBlt);
            OpaqueRect        = new OpaqueRectDelegate(iPrimary.OpaqueRect);
            DrawNineGrid      = new DrawNineGridDelegate(iPrimary.DrawNineGrid);
            MultiDstBlt       = new MultiDstBltDelegate(iPrimary.MultiDstBlt);
            MultiPatBlt       = new MultiPatBltDelegate(iPrimary.MultiPatBlt);
            MultiScrBlt       = new MultiScrBltDelegate(iPrimary.MultiScrBlt);
            MultiOpaqueRect   = new MultiOpaqueRectDelegate(iPrimary.MultiOpaqueRect);
            MultiDrawNineGrid = new MultiDrawNineGridDelegate(iPrimary.MultiDrawNineGrid);
            LineTo            = new LineToDelegate(iPrimary.LineTo);
            Polyline          = new PolylineDelegate(iPrimary.Polyline);
            MemBlt            = new MemBltDelegate(iPrimary.MemBlt);
            Mem3Blt           = new Mem3BltDelegate(iPrimary.Mem3Blt);
            SaveBitmap        = new SaveBitmapDelegate(iPrimary.SaveBitmap);
            GlyphIndex        = new GlyphIndexDelegate(iPrimary.GlyphIndex);
            FastIndex         = new FastIndexDelegate(iPrimary.FastIndex);
            FastGlyph         = new FastGlyphDelegate(iPrimary.FastGlyph);
            PolygonSC         = new PolygonSCDelegate(iPrimary.PolygonSC);
            PolygonCB         = new PolygonCBDelegate(iPrimary.PolygonCB);
            EllipseSC         = new EllipseSCDelegate(iPrimary.EllipseSC);
            EllipseCB         = new EllipseCBDelegate(iPrimary.EllipseCB);

            primary->DstBlt            = Marshal.GetFunctionPointerForDelegate(DstBlt);
            primary->PatBlt            = Marshal.GetFunctionPointerForDelegate(PatBlt);
            primary->ScrBlt            = Marshal.GetFunctionPointerForDelegate(ScrBlt);
            primary->OpaqueRect        = Marshal.GetFunctionPointerForDelegate(OpaqueRect);
            primary->DrawNineGrid      = Marshal.GetFunctionPointerForDelegate(DrawNineGrid);
            primary->MultiDstBlt       = Marshal.GetFunctionPointerForDelegate(MultiDstBlt);
            primary->MultiPatBlt       = Marshal.GetFunctionPointerForDelegate(MultiPatBlt);
            primary->MultiScrBlt       = Marshal.GetFunctionPointerForDelegate(MultiScrBlt);
            primary->MultiOpaqueRect   = Marshal.GetFunctionPointerForDelegate(MultiOpaqueRect);
            primary->MultiDrawNineGrid = Marshal.GetFunctionPointerForDelegate(MultiDrawNineGrid);
            primary->LineTo            = Marshal.GetFunctionPointerForDelegate(LineTo);
            primary->Polyline          = Marshal.GetFunctionPointerForDelegate(Polyline);
            primary->MemBlt            = Marshal.GetFunctionPointerForDelegate(MemBlt);
            primary->Mem3Blt           = Marshal.GetFunctionPointerForDelegate(Mem3Blt);
            primary->SaveBitmap        = Marshal.GetFunctionPointerForDelegate(SaveBitmap);
            primary->GlyphIndex        = Marshal.GetFunctionPointerForDelegate(GlyphIndex);
            primary->FastIndex         = Marshal.GetFunctionPointerForDelegate(FastIndex);
            primary->FastGlyph         = Marshal.GetFunctionPointerForDelegate(FastGlyph);
            primary->PolygonSC         = Marshal.GetFunctionPointerForDelegate(PolygonSC);
            primary->PolygonCB         = Marshal.GetFunctionPointerForDelegate(PolygonCB);
            primary->EllipseSC         = Marshal.GetFunctionPointerForDelegate(EllipseSC);
            primary->EllipseCB         = Marshal.GetFunctionPointerForDelegate(EllipseCB);
        }
예제 #2
0
        public void RegisterInterface(IPrimaryUpdate iPrimary)
        {
            DstBlt = new DstBltDelegate(iPrimary.DstBlt);
            PatBlt = new PatBltDelegate(iPrimary.PatBlt);
            ScrBlt = new ScrBltDelegate(iPrimary.ScrBlt);
            OpaqueRect = new OpaqueRectDelegate(iPrimary.OpaqueRect);
            DrawNineGrid = new DrawNineGridDelegate(iPrimary.DrawNineGrid);
            MultiDstBlt = new MultiDstBltDelegate(iPrimary.MultiDstBlt);
            MultiPatBlt = new MultiPatBltDelegate(iPrimary.MultiPatBlt);
            MultiScrBlt = new MultiScrBltDelegate(iPrimary.MultiScrBlt);
            MultiOpaqueRect = new MultiOpaqueRectDelegate(iPrimary.MultiOpaqueRect);
            MultiDrawNineGrid = new MultiDrawNineGridDelegate(iPrimary.MultiDrawNineGrid);
            LineTo = new LineToDelegate(iPrimary.LineTo);
            Polyline = new PolylineDelegate(iPrimary.Polyline);
            MemBlt = new MemBltDelegate(iPrimary.MemBlt);
            Mem3Blt = new Mem3BltDelegate(iPrimary.Mem3Blt);
            SaveBitmap = new SaveBitmapDelegate(iPrimary.SaveBitmap);
            GlyphIndex = new GlyphIndexDelegate(iPrimary.GlyphIndex);
            FastIndex = new FastIndexDelegate(iPrimary.FastIndex);
            FastGlyph = new FastGlyphDelegate(iPrimary.FastGlyph);
            PolygonSC = new PolygonSCDelegate(iPrimary.PolygonSC);
            PolygonCB = new PolygonCBDelegate(iPrimary.PolygonCB);
            EllipseSC = new EllipseSCDelegate(iPrimary.EllipseSC);
            EllipseCB = new EllipseCBDelegate(iPrimary.EllipseCB);

            primary->DstBlt = Marshal.GetFunctionPointerForDelegate(DstBlt);
            primary->PatBlt = Marshal.GetFunctionPointerForDelegate(PatBlt);
            primary->ScrBlt = Marshal.GetFunctionPointerForDelegate(ScrBlt);
            primary->OpaqueRect = Marshal.GetFunctionPointerForDelegate(OpaqueRect);
            primary->DrawNineGrid = Marshal.GetFunctionPointerForDelegate(DrawNineGrid);
            primary->MultiDstBlt = Marshal.GetFunctionPointerForDelegate(MultiDstBlt);
            primary->MultiPatBlt = Marshal.GetFunctionPointerForDelegate(MultiPatBlt);
            primary->MultiScrBlt = Marshal.GetFunctionPointerForDelegate(MultiScrBlt);
            primary->MultiOpaqueRect = Marshal.GetFunctionPointerForDelegate(MultiOpaqueRect);
            primary->MultiDrawNineGrid = Marshal.GetFunctionPointerForDelegate(MultiDrawNineGrid);
            primary->LineTo = Marshal.GetFunctionPointerForDelegate(LineTo);
            primary->Polyline = Marshal.GetFunctionPointerForDelegate(Polyline);
            primary->MemBlt = Marshal.GetFunctionPointerForDelegate(MemBlt);
            primary->Mem3Blt = Marshal.GetFunctionPointerForDelegate(Mem3Blt);
            primary->SaveBitmap = Marshal.GetFunctionPointerForDelegate(SaveBitmap);
            primary->GlyphIndex = Marshal.GetFunctionPointerForDelegate(GlyphIndex);
            primary->FastIndex = Marshal.GetFunctionPointerForDelegate(FastIndex);
            primary->FastGlyph = Marshal.GetFunctionPointerForDelegate(FastGlyph);
            primary->PolygonSC = Marshal.GetFunctionPointerForDelegate(PolygonSC);
            primary->PolygonCB = Marshal.GetFunctionPointerForDelegate(PolygonCB);
            primary->EllipseSC = Marshal.GetFunctionPointerForDelegate(EllipseSC);
            primary->EllipseCB = Marshal.GetFunctionPointerForDelegate(EllipseCB);
        }