Vadim Zeitlin
b1bf7dc722
Add a simple wxStack<> template class based on wxVector<>.
...
This is still simpler than std::stack<> which can be used with any container
and not just wxVector<> but better than the WX_DECLARE_STACK() macro which was
all that we had before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:46:34 +00:00
Jaakko Salli
eb40c2d836
Changed wxMSW wxGraphicsContext font rendering and extent calculation to take into the account that the page scale has been manually changed when using print contexts ( fixes #12830 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-17 10:11:49 +00:00
Dimitri Schoolwerth
e38f5435fb
compilation fixes for wxMSW compilation with wxUSE_PALETTE set to 0
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-04 19:00:10 +00:00
Jaakko Salli
7fa3cf6a64
Revert unintended commit
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 15:23:19 +00:00
Jaakko Salli
4f320d7c57
Try to better revert to the original string value in wxBitmapComboBox::RecreateControl()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 15:20:32 +00:00
Vadim Zeitlin
c929ad9141
Correct checks for wxUSE_PRINTING_ARCHITECTURE and wxUSE_ENH_METAFILE.
...
Compilation fixes for building without one or both of these symbols.
See #12664 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-16 22:38:32 +00:00
Francesco Montorsi
6f32f3cea2
fix bug in wxGDIPlusMatrixData::Rotate: it must take radians for coherency with docs and other ports but GDI+ wants degrees.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-09 17:58:13 +00:00
Jaakko Salli
8371a35340
Added wxGraphicsContext::Create(const wxEnhMetaFileDC& dc) so that wxPrintPreview can work with wxMSW's wxGraphicsContext ( closes #12028 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 08:22:36 +00:00
Jaakko Salli
465642da29
In wxGDIPlusContext::GetTextExtent(), return more accurate text height if possible
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 13:54:20 +00:00
Jaakko Salli
a53b5e867b
Set wxGraphicsContext page scale, which is required for printing to work properly
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 13:52:12 +00:00
Vadim Zeitlin
4ee4c7b948
Add support for gradient stops to wxGraphicsContext.
...
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.
Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.
Closes #11897 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 12:15:11 +00:00
Vadim Zeitlin
f49c80c105
Use helper wxColourToColor function in wxMSW wxGraphicsContext code.
...
Don't repeat Color ctor from wxColour all the time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 11:44:28 +00:00
Stefan Csomor
918df9d264
fixing typo
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-08 06:54:20 +00:00
Stefan Csomor
c315587c21
fixing gdiplus implementation, see #11282
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-07 05:53:19 +00:00
Vadim Zeitlin
942d5e2d72
Replaced GraphicsHDC from src/msw/renderer.cpp with wxDC::GetTempHDC().
...
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
2009-10-05 22:56:58 +00:00
Stefan Csomor
2986eb869c
adding construction from native bitmaps
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 19:45: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
Vadim Zeitlin
b4715d08bf
correct Borland #pragma hdrstop position
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 20:54:03 +00:00
Vadim Zeitlin
5aac6f3f95
remove MSVC warnings about DLL-exported class inheriting from non DLL-exported one by not exporting private classes at all
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-11 13:16:45 +00:00
Vadim Zeitlin
c496d8fa88
suppress unused parameter warning
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-17 12:01:07 +00:00
Stefan Csomor
bf02a7f976
switching to compositing operators ( fixes #9881 ), adding layers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-15 16:52:05 +00:00
Francesco Montorsi
94a007ece4
a few more int/wxPolygonFillMode substitutions in wxRegion and wxGraphicsContext code
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 16:43:56 +00:00
Vadim Zeitlin
091111d693
fix compilation after r56753 ( closes #10218 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-22 22:40:13 +00:00
Vadim Zeitlin
0b7dce5480
fix warnings about hiding virtual wxGraphicsContext::DrawText() overloads by using different names for the implementation functions
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-13 12:16:39 +00:00
Stefan Csomor
81e0b3d978
copying sizes upon construction, HDC doesn't deliver these values reliably for things like memory dcs, fixes #10012
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-01 09:38:33 +00:00
Stefan Csomor
4fff14c955
fixing release handling of dc
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-01 08:09:45 +00:00
Stefan Csomor
fbd5416f60
supporting GetSize, fixes #9969
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-24 09:18:38 +00:00
Stefan Csomor
1011fbebdb
guarding all text methods against unset font
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-02 06:40:21 +00:00
Stefan Csomor
f772729b7c
adding missing include for non-precomp builds, and grouping headers, solves #9744
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-16 08:59:27 +00:00
Václav Slavík
e75c685a46
revert part of r54233 that was included by accident
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-15 13:15:44 +00:00
Václav Slavík
bce82a758f
if gdiplus.dll cannot be loaded, return NULL from wxGraphicsContext::Create() instead of silently pretending to render the output, but do nothing
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-15 13:14:32 +00:00
Robert Roebling
0b822969a6
Added new wxGraphicsContext:Create( wxPrinterDC ) instead of wxDC:CreateGraphicsContext
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-28 20:39:57 +00:00
Stefan Csomor
bce28872ac
graphics bitmap implementation, fix for bitmap scaling
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-27 08:30:30 +00:00
Stefan Csomor
623cf1fa93
moving things to private headers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-18 13:26:19 +00:00
Stefan Csomor
52018692fa
adaptions for latest dc changes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 16:40:30 +00:00
Stefan Csomor
0c7bd159af
forward port from 2.8
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-09 20:45:56 +00:00
Vadim Zeitlin
595fda6f9c
don't add 0.5 to GetTextExtent() results and do take trailing spaces into account, as wxDC does (patch 1814620)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-06 01:43:56 +00:00
Robin Dunn
87f8a3cf25
Use premultiplied alpha pixel format to match what is used everywhere else in wxMSW.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-23 21:36:13 +00:00
Vadim Zeitlin
c5b8c66a84
use fabs() instead of abs() to fix mingw32 compilation (bug 1797589)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-19 10:12:11 +00:00
Vadim Zeitlin
385addaf21
shut down GDI+ from a module instead of doing it during static object destruction time when it may be too late (patch 1792915)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-19 01:02:16 +00:00
Robin Dunn
d9485f89b8
Forward port of my recent changes in the 2.8 branch:
...
* Force use of floating point math in wxGCDC::DoDrawEllipticArc.
* Check for 0.5 offset in wxGCDC::DoDrawRoundedRectangle and
DoDrawEllipse. Set wxGDIPlusContext to use the offset.
* Avoid crash in wxStdDialogButtonSizer::Realize if there is no
negative button.
* Provide implementations for wxCairoPathData::AddPath,
wxCairoContext::Clip, wxCairoContext::DrawBitmap,
wxCairoContext::DrawIcon, and wxCairoContext::GetTextExtent.
* Fix wxCairoContext::DrawText to draw the text using the upper-left
corner for the x,y position, not the baseline.
* Fix wxMacCoreGraphicsRenderer::CreateContext to be able to use a
wxMemoryDC as the target.
* Map wxTELETYPE font family on wxMac to a monospace font.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-26 20:08:41 +00:00
Vadim Zeitlin
eb4083ef0b
removed unnecessary WXDLLIMPEXP_CORE from private classes (fixes VC warning about DLL-exported class using non DLL-exported GraphicsStates in DLL build)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-20 13:39:31 +00:00
Vadim Zeitlin
bdba6fdc0d
VC6 has problems with std::vector and identifiers names 'iterator' in GDI+ headers; switch to using our own stack class instead
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-16 15:17:36 +00:00
Vadim Zeitlin
46ba1bb26d
VC6 compilation fix (don't reuse the same variable in 2 for loops)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-16 15:13:22 +00:00
Vadim Zeitlin
0024ec5086
extracted code including gdiplus.h in a separate header
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-15 03:41:52 +00:00
Vadim Zeitlin
f4322df68b
no changes, just removed TABs/trailing spaces
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:56:34 +00:00
Robin Dunn
248802d010
Add wxGraphicsMatrix::Get
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-05 23:42:52 +00:00
Vadim Zeitlin
cb3a0d420a
GdiplusStartup() takes ULONG_PTR, not DWORD (patch 1596318); also deTABified
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-14 14:05:14 +00:00
Stefan Csomor
773ccc318e
adapting to new inheritance of wxMemoryDC (under MSW only at the moment)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-06 09:47:20 +00:00
Stefan Csomor
93f72baea4
wxGraphicsContext always is using clipping regions in user coordinates
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-06 09:09:32 +00:00