Hi there,
Im looking for a solution to draw a one pixel sized point to a graphics
control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10,
10,10) has no effect.
How to do?
Thanks
Pat 4 12754
Did you try DrawRectangle, with width and height 1 pixel each?
-vJ
"Pat Keel" <pa******@freesurf.ch> wrote in message
news:40***********************@news.sunrise.ch... Hi there, Im looking for a solution to draw a one pixel sized point to a graphics control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10, 10,10) has no effect. How to do? Thanks Pat
Vijaye Raji schrieb: Did you try DrawRectangle, with width and height 1 pixel each?
-vJ
"Pat Keel" <pa******@freesurf.ch> wrote in message news:40***********************@news.sunrise.ch...
Hi there, Im looking for a solution to draw a one pixel sized point to a graphics control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10, 10,10) has no effect. How to do? Thanks Pat
Hi Vijaye,
Yes, unfortunately DrawRectangle with width and height of 1 gives a
square of total 4 pixel. I testet it with the magnifiying glass function
of WinXP.
Any other solutoins?
ooops. Sorry. I should have said FillRectangle. DrawRect, uses a pen to
draw a border, FillRect, doesn't.
-vJ
"Pat Keel" <pa******@freesurf.ch> wrote in message
news:40***********************@news.sunrise.ch... Vijaye Raji schrieb: Did you try DrawRectangle, with width and height 1 pixel each?
-vJ
"Pat Keel" <pa******@freesurf.ch> wrote in message news:40***********************@news.sunrise.ch...
Hi there, Im looking for a solution to draw a one pixel sized point to a graphics control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10, 10,10) has no effect. How to do? Thanks Pat Hi Vijaye, Yes, unfortunately DrawRectangle with width and height of 1 gives a square of total 4 pixel. I testet it with the magnifiying glass function of WinXP. Any other solutoins?
Hi Vijaye,
This makes the job! Thank You!
SolidBrush b = new SolidBrush(Color.Black);
g.FillRectangle(b, x, y, 1,1);
Nice workaround.
Best Regards
Pat
Vijaye Raji schrieb: ooops. Sorry. I should have said FillRectangle. DrawRect, uses a pen to draw a border, FillRect, doesn't.
-vJ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ivan D |
last post by:
(planning to do this in C#)
plz, if you know tell me :)
Im interested in handling the drawing to a surface
manually pixel by pixel. For example I want to draw a
640x480 image according to some...
|
by: John |
last post by:
How can I draw single 1x1 pixel "dot" in window? Not a
line, I really mean "dot".
|
by: Pat Keel |
last post by:
Hi there,
Im looking for a solution to draw a on pixel sized point to a graphics
control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10,
10,10) has no effect.
How to do?
Thanks
Pat
|
by: Pat Keel |
last post by:
Hi there,
I'm looking for a solution to draw a one pixel sized point to a graphics
control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10,
10,10) has no effect.
How to do?
Thanks...
|
by: felix |
last post by:
Hi,
I have an Image that is drawn with Graphics.DrawImage(..). What I want
to do is drawing it with a given transparency, e.g. at an alpha of only
180 instead of 255.
How am I doing that?!?!?...
|
by: Richard |
last post by:
I have a requirement to put a GDI style circle or rectangle border around
the selected row of a datagrid/ It will overlap into the row above and below
the selected row. Doing this in a the OnPaint...
|
by: Oberfuhrer |
last post by:
I am an old mathematician, who in my sparetime work on a topic oriented math
application.
I have converted from old, dry Fortran to the more intuitive and juicy
VB.net and Windows.
In...
|
by: cmbardon |
last post by:
I'm trying to create a form with some rounded controls, and I'm having
some problems with the rounding not working correctly. I've tried a
couple of different methods for creating the graphics...
|
by: active |
last post by:
I've been looking on the Internet for a way to convert a DIB to a Bitmap
without success.
Now I'm wondering if that is the approach I should be taking.
All I want to do is display the DIB or...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |