Search found 211 matches

by lester
Sat Mar 29, 2008 12:17 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

What dc You use - wxMemoryDC, wxPaintDC, wxClientDC, wxBufferedDC ?
by lester
Sat Mar 29, 2008 12:11 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

I cannot understand why it draw so ugly for You, that's my screen with this function:
by lester
Sat Mar 29, 2008 11:47 am
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

Thanks, I don`t know it before
by lester
Sat Mar 29, 2008 9:52 am
Forum: The Code Dump
Topic: Antialiased line
Replies: 0
Views: 1420

Antialiased line

wxWidgets implementation of Wu's algorithm /**********************************************************************************************/ wxColour GetColorAverage( wxColour color1, wxColour color2, float weight) { unsigned char r, g, b; r = (unsigned char)( 1.0 * color1.Red() * weight + 1.0 * colo...
by lester
Sat Mar 29, 2008 9:49 am
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

Lester, this is very interesting stuff! Would you consider reposting that in the Code Dump under a new topic? It might help people looking for a line drawing routine. Also, you might want to consider seeing if this can be integrated with wxWidgets itself. It would be a nice contribution to the orig...
by lester
Fri Mar 28, 2008 10:50 pm
Forum: C++ Development
Topic: Bug in wxDC?
Replies: 12
Views: 1475

I have found solution, now I use wxImage for remove mask:

Code: Select all

	wxImage tImage = t_bmpMini.ConvertToImage();
	tImage.SetMask( false );
	t_pResult = new wxBitmap( tImage );
I this way result bitmap shown full
by lester
Fri Mar 28, 2008 10:06 pm
Forum: C++ Development
Topic: Displaying wxStaticText in a wxToolBar
Replies: 8
Views: 1352

Already tried it. Does not work at all for me. Even if it did, I don't think it's a practical solution: brevity is of the essense and having a 100+ width for a three letter label is just plain silly. Since you saw the same thing I did when you tried it, I'm thinking this is a legitimate bug and wil...
by lester
Fri Mar 28, 2008 8:43 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

v2 for draw coloured line ( use Pen and Brush from DC ) /**********************************************************************************************/ wxColour GetColorAverage( wxColour color1, wxColour color2, float weight) { unsigned char r, g, b; r = (unsigned char)( 1.0 * color1.Red() * weight...
by lester
Fri Mar 28, 2008 8:20 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

It work :) That's my implementation of Wu's algorithm for wxWidgets ( I have found code and adapt it to wx ), it's ugly but work fine: /**********************************************************************************************/ void DrawWuLine( wxDC *pDC, short X0, short Y0, short X1, short Y1 )...
by lester
Fri Mar 28, 2008 7:56 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

I have found better code - WU line, please wait...
by lester
Fri Mar 28, 2008 7:44 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

I have found one example: void AALine(int x0, int y0, int x1, int y1) { int addr = (y0*640+x0)*4; int dx = x1-x0; int dy = y1-y0; /* By switching to (u,v), we combine all eight octants */ if (abs(dx) > abs(dy)) { /* Note: If this were actual C, these integers would be lost * at the closing brace. Th...
by lester
Fri Mar 28, 2008 2:45 pm
Forum: C++ Development
Topic: drawline produces broken lines
Replies: 21
Views: 3447

Are You sure that attach file? I cannot see it
by lester
Fri Mar 28, 2008 1:59 pm
Forum: C++ Development
Topic: wxString memory allocation problem
Replies: 4
Views: 784

Helios wrote:I have to create a query within the converted data inside.
maybe don`t use wxString at all and use strcat for it?
by lester
Fri Mar 28, 2008 1:17 pm
Forum: C++ Development
Topic: wxString memory allocation problem
Replies: 4
Views: 784

Hi, why You convert data to wxString?
by lester
Fri Mar 28, 2008 10:59 am
Forum: C++ Development
Topic: Redraw ScreenDC
Replies: 3
Views: 758

Also You ca use shaped frame for show selection - for it exist sample in wxWidgets