The changes of ae2cb7d347 resulted in
transformation matrix not being initialized correctly any more.
Fix this by adding yet another helper, DoInitContext(), called both when
initializing wxGCDC using an existing wxGraphicsContext in the
corresponding ctor and the just created one in the other ones.
Closes#18429.
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
Avoid creating a default wxGraphicsContext unnecessarily, only to
immediately delete it and replace it with the provided one.
This was at best unnecessary and at worst resulted in a crash if the
default context couldn't be created, as happened on a headless system
(where wxImage-based wxGraphicsContext can still be created
successfully).
The new method returns a boolean flag which indicates whether there is
any clipping region or not and so is preferable to using the old one and
checking its return value to determine this, which can't be done
reliably.
In wxGCDCImpl::ComputeScaleAndOrigin() current affine transformation matrix (applied with SetTransformMatrix, ResetTransformMatrix) has to be concatenated with current basic transformations (applied with SetDeviceOrigin, SetLogicalScale, etc.).
Closes#17674.
Graphics renderers (exposed through wxGraphicsContext) support arbitrary affine transformations so it is possible to add support for affine transformations in wxGCDC by implementing all wxGCDC::*TransformMatrix() functions with calls to respective wxGraphicsContext functions.
Additionally, this implementation adds support for affine transformations in wxDC under wxGTK3 because in this port wxDC is equivalent to wxGCDC.
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().
See #17646.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
done for GDI+.
* Enable the use of the wxCairoContext on MSW.
* Enable creating a wxGCDC from an exisiting wxGraphicsContext.
* Since it's possible for a DLL that is using wx to not be on the PATH nor in
the same location as the .exe, change the wxDynamicLibrary::RawLoad method to
explicitly look first in the same place as the main wx-using binary. This way
it will find DLLs that are in the same folder as the wx-using binary even if
that would not be in the normal DLL search path.
* Change wxDCImpl and wxDC::GetLogicalScale to be const methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no reason for this accessor to not be const and it prevents other
methods using it from being const too, so change this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixed commented names (path, filename, and extension) of files in include/ and src/. Prepended the names in src/ with "src/" everywhere, while starting those in include/wx/ with "wx/".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDC::GetTempHDC() method provides a convenient and safe way to retrieve HDC
from a wxDC object, whether it is using GDI or GDI+. It is implemented using
(MSW-specific) virtual functions in wxDC and so doesn't need ugly hacks like
wxDynamicCast which were used in src/msw/renderer.cpp to achieve the same
effect.
Also, we now use GetTempHDC() consistently in all wxMSW rendering methods as
the old GraphicsHDC was only used in some of them meaning that many methods
didn't work at all with wxGCDC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is huge but there are no non-white-space changes in it.
Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775