Commit Graph

57 Commits

Author SHA1 Message Date
Maarten Bent
51254a148e Make wxSVGFileDC an abstract class 2019-11-29 01:10:43 +01:00
Maarten Bent
bee6168076 Make wxSVGFileDC function parameter names consistent with wxDC 2019-08-21 22:33:36 +02:00
Maarten Bent
0b728d1bea Use base version of DrawCheckMark directly in wxSVGFileDC 2019-08-21 22:33:36 +02:00
Maarten Bent
75486529e3 Process review comments in wxSVGFileDC 2019-08-21 22:33:35 +02:00
Maarten Bent
dfe76430cc Implement GradientFillLinear and GradientFillConcentric for wxSVGFileDC 2019-08-20 20:21:05 +02:00
Maarten Bent
26b273bef9 Fix RTTI class declarations of wxSVGFileDC
wxIMPLEMENT_DYNAMIC_CLASS requires a default constructor (no filename). Check
if m_outfile is initialized with a valid filename before using it.
2019-08-20 20:21:05 +02:00
Maarten Bent
a41a8ded79 Allow to set wxSVGFileDC shape rendering mode 2019-08-20 20:21:05 +02:00
Maarten Bent
e32721247a Use wxFileName in wxSVGBitmapFileHandler constructor 2019-04-23 21:20:02 +02:00
Maarten Bent
310b06402e Remove unused variable in wxSVGFileDC 2019-04-10 23:44:26 +02:00
Maarten Bent
b7bf6640ed Restore original wxSVGBitmapFileHandler behaviour
Save the embedded images in the same directory as the SVG file, not in the
runtime directory.
2019-04-10 23:41:58 +02:00
Maarten Bent
19c66c780d White-space only changes in wxSVGFileDC code 2019-04-10 23:37:34 +02:00
Paul Cornett
4ad6f67147 Fix build with wxUSE_PALETTE==0 2018-10-09 22:24:58 -07:00
Vadim Zeitlin
6a442d2723 Remove unnecessary clipping virtual methods from wxSVGFileDCImpl
These methods seem to be useless as they're never called, only the
corresponding DoXXX() methods are used by wxDC.
2018-06-18 17:07:14 +02:00
Artur Wieczorek
1eef3fc5fc Add header file with missing wxScopedPtr declaration
wxScopedPtr is referred in wxSVGFileDCImpl declaration, but corresponding
header file is not explicitly included. This can break the compilation if
wxScopedPtr declaration is not included by chance by another module (e.g.
is taken from translation.h but it is not effective when wxUSE_INTL==0).
2017-07-31 23:50:06 +02:00
Maarten Bent
97c7ac4289 Code cleanup in wxSVGFileDC.
Consistent white-space usage.
Use wxS macros for strings.
Check if output stream is OK when writing.
Removed unnecessary Borland pragmas.
2016-06-12 18:40:12 +02:00
Maarten Bent
9e07ba8fae Support SetDeviceOrigin and SetAxisOrientation in wxSVGFileDC.
Override SetDeviceOrigin, SetLogicalOrigin and SetAxisOrientation from wxDC and mark the graphics as changed, so the correct transform translations are applied.
2016-06-12 18:40:11 +02:00
Maarten Bent
1717db0373 Improved memory management in wxSVGFileDC. 2016-06-12 18:40:11 +02:00
Maarten Bent
b55a18f6b8 Generate valid XML in wxSVGFileDC and updated wxSVGVersion.
Use the correct doc-type and specify the encoding. 'title' is not a valid attribute of <image> so remove it.
Removed superfluous white-space and improved indenting in generated XML.
2016-06-12 18:40:10 +02:00
Maarten Bent
045265a7bb Allow to set the SVG title when creating a wxSVGFileDC. 2016-06-12 15:59:28 +02:00
Maarten Bent
3cc4d51c9b Implemented Clear in wxSVGFileDC.
Draw a rectangle with the background colour and a transparent pen.
Closes #15788.
2016-06-12 15:59:27 +02:00
Maarten Bent
444c5fd630 Correctly draw poly-polygons in wxSVGFileDC.
Each polygon in the poly-polygon needs to end with the start-point. The implementation is similar to the wxDCImpl implementation, except for the extra end points that are inserted.
2016-06-12 15:59:26 +02:00
Maarten Bent
ebab640578 Enable usage of clipping regions in wxSVGFileDC.
It was implemented 3 and half years ago in 614e38d.
Close remaining clipping regions when closing the SVG file.
2016-06-12 15:59:26 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
a2a846e473 Allow customizing bitmap handling in wxSVGFileDC.
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.

And also allow to define custom handlers to make the behaviour even more
flexible.

Closes #15968.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 17:26:27 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
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
2013-07-26 16:02:46 +00:00
Paul Cornett
4787c92d39 use const arrays for wxDC array parameters, closes #10712
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-18 17:27:51 +00:00
Vadim Zeitlin
614e38dbb2 Implement clipping in wxSVGFileDC.
Support setting the clipping region and add update the documentation and the
sample accordingly.

Closes #14462.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 23:40:41 +00:00
Vadim Zeitlin
c9848e6318 No real changes, just slightly simplify wxSVGFileDCImpl code.
Move m_graphics_changed check inside NewGraphics() itself instead of checking
whether it's true each time before calling it, it is better to both test the
flag and reset it inside this function rather than do the first part in the
caller and the second one in the callee.

Also rename the function to NewGraphicsIfNeeded() to make its meaning more
clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:19:11 +00:00
Robin Dunn
9eefb5c14a Adding wxDC::GetHandle for wxOSX-cocoa and wxOSX-carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:03 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
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
2009-08-21 10:41:26 +00:00
Francesco Montorsi
89efaf2b65 change generic ints to enums in wxDC (closes #9959)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 14:21:53 +00:00
Vadim Zeitlin
fdaad94e75 deprecate wxDC::SetClippingRegion(wxRegion) overload and replace it with SetDeviceClippingRegion() to avoid confusion due to use of different kind of coordinates in this and other overloads of the same function; also rename wxDCImpl::DoSetClippingRegionAsRegion() to DoSetDeviceClippingRegion(); finally use bounding box of the region passed to wxDCClipper ctor to avoid interpreting coordinates differently for different ctors of the same class (see #8970)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-08 01:45:56 +00:00
Paul Cornett
2a23042680 fix some warnings from GCC -Wextra
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-15 17:24:48 +00:00
Vadim Zeitlin
163b3ad72c replace wrong WXDLLEXPORT declarations with correct WXDLLIMPEXP_BASE/ADV/GL (patch from Tim Stahlhut)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-12 01:35:53 +00:00
Vadim Zeitlin
f087550131 remove default wxDC ctor to make it impossible to construct DCs without the associated wxDCImpl (this breaks compilation of classes such as wxMirrorDC instead of crashing at run-time); fixed wxMirrorDC compilation after breaking it; renamed wxDCFactory::GetFactory() to just Get(), no need to be repetitive
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 20:56:12 +00:00
Robert Roebling
78cededfdc remove test for new dc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 20:00:19 +00:00
Robert Roebling
888dde65f4 DC reorganization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 13:48:22 +00:00
Robert Roebling
d8416992be reorganized wxSVGFileDC code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-24 09:30:24 +00:00
Vadim Zeitlin
b0fc907f70 added wxUSE_SVG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-11 20:52:41 +00:00
Vadim Zeitlin
8e10778e0e cleanup: indentation, line length, don't include unneeded headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-11 20:42:37 +00:00
Robert Roebling
04ab8b6ddf Moved all the coordinate system calculation to wxDCBase
and thus removed all the duplicated code in all wxDC
   classes.
  Problematic is that wxSVGFileDC and wxPostscriptDC inherit
   from wxDC and therefore include platform specific code
   (also before this change) so I chose to override all
   SetLogicalOrigin() etc. methods in these classes and
   call their wxDCBase methods thereby circumventing the
   platform dependent code.
  I'm afraid the Mac code will require updating, too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 11:05:45 +00:00
Robert Roebling
621b83d9b3 Made device to logical and vv conversion methods
virtual and implement them like any other method
    in the wxDC classes, not only in the their files
    but somehow belonging to the wxDCBase class.
  This is required for plugging in differnt DC backends
    with different conversions.
  Ideally (and absolutely possible ) all these methods
    should be removed and just the one in wxDCBase
    should stay using values set in the various
    derived classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-01 21:28:29 +00:00
Chris Elliott
210bb741b9 remove warnings of intentionally unreachable code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-26 11:11:28 +00:00
Vadim Zeitlin
c94f845b16 changed wxDC::GetTextExtent() and related methods to take const wxFont pointer, for consistency with wxWindow::GetTextExtent() and because it generally doesn't need a non-const font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-25 01:49:47 +00:00
Chris Elliott
dedead3227 add const to avoid hiding warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-20 08:09:06 +00:00
Václav Slavík
47b378bd88 removed extra semicolons (patch #1700459; fixes compilation with gcc's -pedantic flag)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-14 09:58:37 +00:00
Robin Dunn
18cea8715a Patch from FM with more bakefile tweaks and etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 18:26:59 +00:00
Robin Dunn
54429bb380 Bakefile and other changes for new locations of STC and wxSVGFileDC.
Remove old files in contrib.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 06:27:23 +00:00
Włodzimierz Skiba
ae0fbceefa #include markup fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-07 14:01:37 +00:00