all groups > dotnet drawing api > october 2006 >
You're in the

dotnet drawing api

group:

A question about TextureBrush


A question about TextureBrush kurt
10/25/2006 6:02:31 PM
dotnet drawing api:
hello all

i am getting a strange effect when i use TextureBrush to fill a areal
on a graphic surface.
It seems that when the areal is not very large the filling effect is
normal but when the length
or width of the areal is very large for example more than 60000(inot
exactly,i mean the
number is very large) the stange effect
happens(http://pic17.album.tom.com/album_pic/2006/10/26/3e777c6320679eb196594decaca52253?%75%4e%6b%43%67%76%48%72%67%75
).
can anybody help me ?

Regards,
Kurt
Re: A question about TextureBrush kurt
10/25/2006 6:17:01 PM
the effect picture: http://album.ent.tom.com/album/hhljkl
Re: A question about TextureBrush Jon Shemitz
10/25/2006 7:54:48 PM
[quoted text, click to view]

60000 is a strange binary number. Does 32767 work as expected, while
32768 does not? (If so, then somewhere in the stack there's some code
that's using signed 16-bit arithmetic, and the solution is to stick to
bitmaps smaller than wioth length or width less than 32768. If not,
then something else is going on.)

--

..NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Re: A question about TextureBrush Bob Powell [MVP]
10/26/2006 11:04:36 PM
See the article on actual capabilities of the Graphics object for
_theoretical_ drawing sizes.

In practice the size of a bitmap is limited by memory. A bitmap 60,000
pixels wide doesn't have to be very tall to eat up all of your available
memory. A Bitmap created in memory is likely to have a 32 bpp footprint so
for example 60,000 squared is over 14 gigabytes.

Most systems will choke on more than a couple of gigs.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



[quoted text, click to view]

AddThis Social Bookmark Button