← Back to team overview

kicad-developers team mailing list archive

Re: GDI+ sucks / how to compile under Windows

 

Manveru wrote:




2010/2/12 Wayne Stambaugh <stambaughw@... <mailto:stambaughw@...>>


[...]
> >
> > Compilation of KiCad from latest revision under Windows is _not
> > straightforward_ anymore. Because there is a strong need for gdi+
> > libraries, this link might be useful:
> >
> >
>
http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=>
>
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=>>
> >
>
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=>
>
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
<http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=>>>
> >
> > This requires to rebuild the wxWidgets 2.9.0 once again this
time with
> > wxGraphicsContext, so there might be a problem with gdi+ stuff
with
> > wxWidgets.
> >
> > Solution is here:
> >
>
http://www.miscdebris.net/blog/2009/09/17/adding-gdi-headers-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/
> >
> >
> > This message is only an informative announcement to anyone
> interested in
> > mingw build of KiCad under Windows. Hope it helps. Maybe it
should go
> > somewhere on the wiki left for further generations (until
> wxWidgets team
> > drop gdi+).
>
> Manveru,
>
> I added this link to COMPILING.txt on SVN r2323 as well as the
> instructions on building wxWidgets to enable wxGraphicsContext using
> MinGW. Enabling USE_WX_GRAPHICS_CONTEXT on windows doesn't work with
> wxWidgets 2.8.10 either. I builds fine but there is difference
between
> the way wxGraphicsContext works on GTK and Windows. It appears
that on
> windows, the coordinate transforms are not implemented properly
and the
> clip box (wxDC clip box not Kicad's internal clip rectangle) is
> somewhere outside the client area. This results in a rather amusing
> behavior where everything that is inside the client window
doesn't get
> repainted. I'm not sure if wxWidgets or GDI+ is to blame. No one
ever
> said cross platform software development was easy :)
>
> Wayne
>
>
> Thank you Wayne, you may add a side note, that compilation of
wxWidgets
> with 3.2 < gcc < 4.4.1 (as far as I investigated the problem) may
> require a CXXFLAGS=-fpermissive option in make invocation. In other
> case, there will be problems with GDI+ headers.

I didn't have any problems building with GCC 3.4.5 on MinGW. I haven't
had the time to give GCC 4.4.x a try on MinGW. I have my hands full
with getting USE_WX_ZOOM fixed.

Wayne


So it seems something between 3.4.5 and 4.4.1 may have problems with following constructs:

struct classsomething {
int classsomething::method(int a) {
return 0;
}
}

This is not legal from C++ standard perspective but present in many project and C++ code and was not problematic till some late gcc 3 and early gcc 4 - according to some bugtraqs it is fixed somewhere on 4.4 branch... (I do not have citations noted).

In regard to first part of the subject - I have KiCad compiled on my laptop (Core2Duo T7100 1.8 GHz with nVidia Quadro NVS 140M) and... pcbnew is very veery veeery slow... and unresponsive to events until everything is drawn on screen (sometime three times is redrawn after focus back to pcbnew window). Instead of some antialiasing I perceive quality of the image as poorer than previously. If I understand correctly, decision about moving KiCad to wxGraphicsContext may make KiCad unusable under Windows until new backed will be developed by wxDevelopers.

So from my perspective it would be better to invest for some OpenGL acceleration of 2D instead of wxGraphicsContext, but that is my private opinion.

We are not using wxGraphicsContext yet. Your comments seem to be based on witnessing the combined (stacked) usage of both wxGCDC and wxGraphicsContext.

And this is not an engineered, or even a deliberate usage. And wxGCDC was probably deliberately poorly written so folks get off of it ASAP.

I still don't know why any conclusions are necessary at this point.

Let's just get the release out, and then see what is wrong with wxDC that we don't like. That is where we are now. On wxDC, not on wxGCDC.

Using wxGCDC is like having a bicycle user interface mounted inside a sports car. Just so customers that were used to riding a bike can drive the sports car, complete with peddles. And then when it does not go faster than a bicycle, we are going to reach conclusions about the sports car?

Dick



--
Manveru
jabber: manveru@... <mailto:manveru@...>
gg: 1624001
http://www.manveru.pl








Follow ups

References