From: Loren Pechtel on
On Wed, 04 Nov 2009 21:55:05 -0500, Family Tree Mike
<FamilyTreeMike(a)ThisOldHouse.com> wrote:

>Loren Pechtel wrote:
>> On Wed, 04 Nov 2009 20:40:56 -0500, Family Tree Mike
>> <FamilyTreeMike(a)ThisOldHouse.com> wrote:
>>
>>> Loren Pechtel wrote:
>>>> On Wed, 04 Nov 2009 12:30:56 -0800, Peter Duniho
>>>> <no.peted.spam(a)no.nwlink.spam.com> wrote:
>>>>
>
><snip>
>
>>>>
>>>> This code *SHOULD* draw one half of the screen with vertical lines and
>>>> one half with horizontal. I'm getting a gray mass on the left and the
>>>> expected behavior on the right.
>>> For what it is worth, I see what you say it *SHOULD* draw when I execute
>>> your routine.
>>
>> What in the world is the difference then? How do I get it to draw
>> what you're seeing?
>
>I suspect screen settings. When I set my display settings really
>poorly, then I see what you observe. My normal settings are 1680x1050
>32 bit color.

3x 1280x1024 @ 32bit.
From: Peter Duniho on
Loren Pechtel wrote:
> Confirmed--it's drawn right, rendered wrong. It doesn't take blowing
> it up to find, either.
>
> Ok, I've been barking up the wrong tree. What could be causing the
> errant display?

Lots of things. With a concise-but-complete code example, we could at
least examine how you're using .NET and see whether there's anything
there that would cause the problem. My guess is that it will turn out
to be a system configuration issue, with nothing at all to do with C# or
..NET (in which case, you'll want to try to reproduce similar behavior
with a delivered application -- e.g. WordPad, Paint, etc. -- so that you
can repost your question in a different context, in a different forum).

Obviously, the first thing should be to review everything you're doing
in terms of presenting the bitmap on the screen, to see if you can find
any code or Designer settings you might have enabled that cause some
scaling to occur.

But without a concise-but-complete code example, there's really nothing
more we can offer here in terms of specifics. And even with one, it's
entirely possible the answer will be "works fine on my machine...you
have a configuration problem".

One thing that does come to mind, along the "configuration" lines, is to
verify that your display is using digital input and is a discrete
display technology. Specifically, LCD or plasma, using a DVI or HDMI
input. If the signal is analog at any point, whether in transmission to
the display or in the display itself (e.g. CRT), then that could explain
the results right there. I've never seen any analog output that doesn't
have at least a little blurring.

If you're using an analog signal to an LCD, you _might_ be able to
adjust the synchronization settings (most LCD monitors have an
"auto-adjust", but at the very least there should be manual
image-registration controls) that allows you to get the image as clear
as possible. That still won't provide the perfect image an all-digital
presentation would, but it could be good enough for your purposes.

Of course, if it _is_ a configuration issue -- that is, you've posted a
concise-but-complete code example and several people have confirmed it
works fine on other computers -- then one option is to just forget about
it, at least for the moment. :) After all, if the code is fine, you
can get on with the rest of the program rather than worrying about this
thing. :)

Pete
From: vanderghast on
I can see fine alternated lines on both on both 1280x1024 on a old Dell
monitor, and 1920x1200 on a little newer Samsung SyncMaster. BUT if I change
the SyncMaster to 1280 x 1024, then I obtain ugly thick horizontal dark bars
alternating with fine light ones BECAUSE 1280x1024 IS NOT a recommended
resolution for it. Nothing to do with C#, DotNet, the driver, the video
card. In fact, capturing the screen in 1280x1024, saving the file, changing
back the resolution to the recommended one by Samsung for that monitor, and
then displaying the captured bitmap in that new resolution... it shows ok,
the ugly pattern has disappear! Or sliding the image from the Samsung at
1280x1024 onto the Dell also at 1280x1024 (which is the recommended one for
that particular Dell), and the image is drawn as intended!

So my recommendation, try to set the resolution to the recommended one by
the MONITOR maker, and if you have lost the doc, try different resolutions
and keep the one which look best. No code involved.


Vanderghast, Access MVP


"Loren Pechtel" <lorenpechtel(a)hotmail.invalid.com> wrote in message
news:OiUW%23PdXKHA.4816(a)TK2MSFTNGP06.phx.gbl...
> On Wed, 04 Nov 2009 21:55:05 -0500, Family Tree Mike
> <FamilyTreeMike(a)ThisOldHouse.com> wrote:
>
>>Loren Pechtel wrote:
>>> On Wed, 04 Nov 2009 20:40:56 -0500, Family Tree Mike
>>> <FamilyTreeMike(a)ThisOldHouse.com> wrote:
>>>
>>>> Loren Pechtel wrote:
>>>>> On Wed, 04 Nov 2009 12:30:56 -0800, Peter Duniho
>>>>> <no.peted.spam(a)no.nwlink.spam.com> wrote:
>>>>>
>>
>><snip>
>>
>>>>>
>>>>> This code *SHOULD* draw one half of the screen with vertical lines and
>>>>> one half with horizontal. I'm getting a gray mass on the left and the
>>>>> expected behavior on the right.
>>>> For what it is worth, I see what you say it *SHOULD* draw when I
>>>> execute
>>>> your routine.
>>>
>>> What in the world is the difference then? How do I get it to draw
>>> what you're seeing?
>>
>>I suspect screen settings. When I set my display settings really
>>poorly, then I see what you observe. My normal settings are 1680x1050
>>32 bit color.
>
> 3x 1280x1024 @ 32bit.

From: Jeff Johnson on
"Loren Pechtel" <lorenpechtel(a)hotmail.invalid.com> wrote in message
news:eHODGXbXKHA.1280(a)TK2MSFTNGP04.phx.gbl...

>> In other words,
>>have you saved your bitmap to disk and then loaded it into a graphics
>>application and increased the zoom so that you can see the individual
>>pixels?
>
> When stripes turn into a blob instead it's quite obvious.

So then that would be a No.

And from the other branch in this thread, it turns out that the bitmap WAS
being created correctly and simply LOOKED wrong on your screen. See how much
trouble you could have saved had you gone this route first?


From: vanderghast on
If someone wish to get a fine pattern independent of the visible size, I
suggest to take a look at using a textured brush.


Vanderghast, Access MVP

"Jeff Johnson" <i.get(a)enough.spam> wrote in message
news:%23QiYCAaXKHA.1268(a)TK2MSFTNGP04.phx.gbl...
> "Loren Pechtel" <lorenpechtel(a)hotmail.invalid.com> wrote in message
> news:%23edaYuQXKHA.1280(a)TK2MSFTNGP04.phx.gbl...
>
>> I'm having trouble with what seems to be a simple task:
>>
>> I'm trying to draw some vector images on a field of tiles. The tiles
>> are always of integer sizes and can zoom over any reasonable range of
>> values.
>>
>> The images themselves are vector images but they don't simply scale
>> up, as the tile gets bigger more detail is added. (Yeah, I know I'll
>> have to handle printing a bit differently.)
>>
>> The problem I'm having is with images composed entirely of vertical
>> and horizontal lines, black on a gray field.
>>
>> The horizontal lines are fine, I get exactly what I want. Vertical
>> lines aren't working too well, though. A lone vertical line is good
>> enough--two pixels of dark gray instead of one of black but it looks
>> close enough I didn't even realize it was wrong until I got digging
>> into the case that's awful:
>>
>> I have some stripes, some are black/background/background and others
>> are black/background.
>>
>> With antialiasing on the ones with the black every three look fuzzy
>> and the closer ones just look like a blurry blob.
>>
>> With it turned off I'm getting a very clear image, albeit very wrong:
>> The three-step one produces dark gray/dark gray/background and the
>> two-step one simply produces a box of dark gray.
>>
>> Everything is being drawn on a bitmap that is then put in a
>> picturebox. The picturebox is in a panel that fills the form other
>> than a few controls on the right for manipulating the view.
>>
>> The behavior would make sense if somehow I was drawing between pixels
>> on the y axis but all the DrawLines are being fed integer coordinates.
>
> I have to ask: are you absolutely positive you're actually getting
> different-colored pixels, or does it just LOOK that way. In other words,
> have you saved your bitmap to disk and then loaded it into a graphics
> application and increased the zoom so that you can see the individual
> pixels?
>

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: URGENT
Next: DataRow InsertAt Database