Questions tagged [gdi]

Graphics Device Interface (GDI) is a device-independent, pure software graphics API under the Windows operating system for drawing graphic primitives and text. It is the underlying base used to render the Windows GUI elements.

Graphics Device Interface (GDI) is a device-independent, pure software graphics API under the Windows operating system for drawing graphic primitives and text. It is the underlying base used to render the Windows GUI elements.

More information at http://en.wikipedia.org/wiki/Graphics_Device_Interface

2158 questions
0
votes
4 answers

Why are my font edges not smooth when drawn with the DrawText API?

When I draw text on an dc, the text comes out with rough edges, and on the multiple windows that this WindowProc handles, the text between each of them look different, which looks unprofessional. Is there a way to draw it so it comes out with crisp,…
Geore Shg
  • 1,299
  • 5
  • 23
  • 38
0
votes
1 answer

Using FFmpeg AutoGen save to bitmap works on Windows but not on Linux

I'm using FFmpeg.AutoGen to decrypt video and save the frames as bitmaps. Code is using dotnet core and I'd like to get it working for both Windows and Linux. The code is similar to the example provided:…
Chris
  • 1,006
  • 10
  • 13
0
votes
1 answer

Render antialiased text using TextRenderer C#

I wrote a program to draw some string on an image. I use graphics.DrawString() but as you can see in this post, it has some problems. TextRenderer.DrawText() solved that problem but the rendered text is jagged. I changed both…
AmirSina Mashayekh
  • 498
  • 1
  • 5
  • 21
0
votes
0 answers

VB.net, What's the best way to display text on screen, OUTSIDE of main form, and remains visible even when form is minimized?

To give an example of what I mean, external FPS counters, that overlay the entire screen or overlay a certain window, it allows for users to click through it, stays visible, and doesn't have a main form window that's visible. Now using visual studio…
0
votes
1 answer

Can one cause problems by prematurely releasing a Windows GDI object?

Can one cause problems by prematurely releasing a Windows GDI object? With memory one can prematurely delete/free a buffer and cause very serious problems indeed. How about GDI? Can one cause a crash or UI painting issues by prematurely releasing a…
Radim Cernej
  • 875
  • 1
  • 10
  • 21
0
votes
0 answers

System.DllNotFoundException: 'gdi32.dll assembly: type: member:(null)'

I have to write a table in an itext7 pdf file. the table must include Arabic words. I've been trying to solve this problem for hours. I found this code so I was trying it: string[] sources = new string[] { "english.xml", "arabic.xml", "hindi.xml",…
rana hd
  • 355
  • 3
  • 18
0
votes
1 answer

C++ Win32 API GDI : Rectangle AntiAliasing not working properly with transparent background

I use extended frame to render a custom caption and window border. hr = DwmExtendFrameIntoClientArea(hWnd, &margins); I also use layered window to render background transparent. My COLORKEY is RGB(0,0,0) SetLayeredWindowAttributes(hWnd, RGB(0, 0,…
0
votes
0 answers

DrawText Refresh Problem - Text Disappears

I'm using Objective Grid and wanted to have a grid cell control that can show an icon and text. So I took RogueWave's example (https://rwkbp.makekb.com/entry/466/) and modified it as below. Initially the text renders correctly, but if I do anything…
Kyudos
  • 625
  • 4
  • 18
0
votes
3 answers

Why call InvalidateRect() in WM_PAINT message?

So i am learning Windows API with book "Programming Windows - Charles Petzold (5th edition)". If i understand correctly, when handling WM_PAINT message calling function BeginPaint() validates given area that has to be updated. However, in this book…
Avtem
  • 55
  • 1
  • 10
0
votes
1 answer

How to print a BMP from file or HDC

I am trying to add printing capability to my Windows app. So far, I have succeeded in (1) painting the image into an HDC; (2) saving it as a BMP file; (3) creating a BITMAPINFOHEADER and pixmap in memory; and (4) creating an HBITMAP object. How can…
DontPanic
  • 2,164
  • 5
  • 29
  • 56
0
votes
2 answers

Isn't there some way to cause win32 GDI calls to interpret coordinates differently?

I would swear that I read somewhere that there's a way to cause GDI calls to treat x,y coordinates differently than the default. For instance, instead of x,y=0,0 being upper left, you could put 0,0 in the lower left, or any other corner. I've tried…
JustJeff
  • 12,640
  • 5
  • 49
  • 63
0
votes
0 answers

How can you set HWND_TOPMOST on Window running at higher privilege?

Is there a method that allows an app running at a lower privilege to use SetWindowPos() to change the HWND_TOPMOST flag for a Window running at a higher privilege? I recall, in the back of my mind, different API's available to allow things like that…
user3161924
  • 1,849
  • 18
  • 33
0
votes
1 answer

GDI Replace drawing after set another value in TrackBar

I want to draw a figure that will change shape when I move the track bar to a different value. For example for value=1 Next I draw for second figure for value=2 I want only one shape. What should I do? Shape should change in every value of Track…
Jola
  • 31
  • 5
0
votes
1 answer

GDI: Is a bitmap created with CreateCompatibleBitmap or CreateDIBSection initilized or not?

I couldn't find any documentation for CreateCompatibleBitmap() or CreateDIBSection() that indicates if the bitmap is initialized or not and if so, what it is initialized to? I would presume it does and it's black? Are my presumptions correct? Is…
user3161924
  • 1,849
  • 18
  • 33
0
votes
1 answer

Why does MS Example of GetDIBits create a new BITMAPINFOHEADER?

The Microsoft example of using GetDIBits here has to code below. My question is why did they create a new bi item instead of just using the bmpScreen on the call to GetDIBits ?: // Get the BITMAP from the HBITMAP …
user3161924
  • 1,849
  • 18
  • 33