Пример #1
0
        public FontHandle(HFONT handle, bool ownsHandle = true)
        {
            Debug.Assert(handle.IsInvalid || Imports.GetObjectType(handle) == ObjectType.Font);

            Handle      = handle;
            _ownsHandle = ownsHandle;
        }
Пример #2
0
        public DebugRenderer(ComPtr <IDXGISurface1> surface)
        {
            _surface = new ComPtr <IDXGISurface1>(surface);

            //const string fontName = "Segoe UI Light";
            const string fontName = "Courier";

            fixed(char *pFont = fontName)
            {
                _font = GDI32.CreateFontW(16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, pFont);
            }

            _brush = GDI32.CreateSolidBrush(new COLORREF(50, 50, 50));
        }
Пример #3
0
 public HRESULT ReleaseHfont(HFONT hFont)
 {
     return(((delegate * unmanaged <IFont *, HFONT, int>)(lpVtbl[25]))((IFont *)Unsafe.AsPointer(ref this), hFont));
 }