Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / howto set a pixel?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. howto set a pixel?
#4581
Posted by: 2004-06-22 23:17:02
I'm new to wxWidgets. I need to know how to draw a single pixel on a surface (on screen). In Visual Basic, I created a picturebox and used a setpixel function to draw a pixel. can some one give me a short code-sample how to do this in wxWidgets?

//Perra
Message2. Re: howto set a pixel?
#4599
Posted by: upCASE 2004-06-24 15:04:58
Hi!
In wxWidgets look for wxDC, create one of the following
wxPaintDC
wxScreeenDC
wxClientDC
depending on when and on what you want to draw and then use SetPoint() from wxDC to draw a pixel. The size, style and colour of that pixel depends on what wxBrush and wxPen you have assigned to wxDC.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Mon 2022-8-15  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0