Commit Graph

67276 Commits

Author SHA1 Message Date
Robin Dunn
699f019c76 Add notes about gradient pens and gradient transforms to changes.txt 2019-09-04 14:21:30 -07:00
Robin Dunn
61a39165b8 documentation tweaks 2019-09-04 14:19:24 -07:00
Robin Dunn
f7896d4dff Use new parameter names in the existing CreateRadialGradientBrush methods too 2019-09-04 14:19:24 -07:00
Robin Dunn
c79085b54d (blind) compilation fix for wxQtGraphicsRenderer gradient brush methods 2019-09-04 14:19:24 -07:00
Robin Dunn
30dfe45759 undo incorrect search/replace 2019-09-04 14:19:24 -07:00
Robin Dunn
80f24d9e74 User more easily understandable names for the radial gradient coordinate parameters in wxGraphicsPenInfo 2019-09-04 14:19:24 -07:00
Robin Dunn
78c1c6ca6d Remove TODO 2019-09-04 14:19:24 -07:00
Robin Dunn
320acc1796 Only clone the gradient's matrix when there is one 2019-09-04 14:19:24 -07:00
Robin Dunn
222049f3ce Move wxMacCoreGraphicsMatrixData so it can be used in wxMacCoreGraphicsPenBrushDataBase 2019-09-04 14:19:24 -07:00
Robin Dunn
97b8d67984 Make section header comments a little more consistent 2019-09-04 14:19:24 -07:00
Robin Dunn
239b8a17b1 Add stroking a path with a gradient on OSX, and also gradient transforms 2019-09-04 14:19:24 -07:00
Robin Dunn
2738565c0d Just API updates to allow building to succeed 2019-09-04 14:19:24 -07:00
Robin Dunn
1e37cca162 Like Direct2D inverting the matrix is needed for gradient transforms 2019-09-04 14:19:24 -07:00
Robin Dunn
fc35d8b49b Comment out some asserts I think are incorrect. Needs verification. 2019-09-04 14:19:24 -07:00
Robin Dunn
2571f5962c Don't use a wxRect to hold floating point values!! 2019-09-04 14:19:24 -07:00
Robin Dunn
a8eeab3af2 Add support for setting the transform on Direct2D gradient brushes 2019-09-04 14:19:24 -07:00
Robin Dunn
6d85b566ce Create gradient brushes for pens in wxD2DRenderer 2019-09-04 14:19:24 -07:00
Robin Dunn
e2fbcf0650 API updates only, to allow building. 2019-09-04 14:19:24 -07:00
Robin Dunn
8478c97ecb Add support for gradient pens for GDI+. API also updated for gradient transforms, but that is not working yet. 2019-09-04 14:19:24 -07:00
Robin Dunn
2008d443a8 Set the wrap mode for linear gradient brushes,
so the areas beyond the end points are properly filled with the end point colors
2019-09-04 14:19:24 -07:00
Robin Dunn
d6060db6f1 Add cairo_pattern_set_matrix 2019-09-04 14:19:24 -07:00
Robin Dunn
177f5d4f2a tweak comments 2019-09-04 14:19:24 -07:00
Robin Dunn
62ea72e937 Adding a matrix to wxGraphicsPenInfo means the classes need reordered again 2019-09-04 14:19:23 -07:00
Robin Dunn
7c33d3f969 Gradients can have matrix transforms too. Updates for Cairo. 2019-09-04 14:19:23 -07:00
Robin Dunn
fd0b19f277 Add the rest of the accessors in wxPenInfo and wxGraphicsPenInfo,
so wxPython can see them.
2019-09-04 14:19:23 -07:00
Robin Dunn
b98ab8b56d Switch to a switch statement 2019-09-04 14:19:23 -07:00
Robin Dunn
c860d50888 Rename some *GradientBrush to *GradientPattern 2019-09-04 14:19:23 -07:00
Robin Dunn
e297b5ded9 Deindent inline code blocks 2019-09-04 14:19:23 -07:00
Robin Dunn
7367f1803d Reorder classes a bit to resolve ordering conflicts 2019-09-04 14:19:23 -07:00
Robin Dunn
0265312297 Update include/wx/graphics.h
fix style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
06bf8e0d41 Update include/wx/graphics.h
fix opening brace style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
694b7e11fc Move the new methods to the wxCairoPenBrushBaseData section of the file 2019-09-04 14:19:23 -07:00
Robin Dunn
59ce48924a Add gradient pen support for Cairo 2019-09-04 14:19:23 -07:00
Robin Dunn
4708d2539e Add gradient-related attributes to wxGraphicsPenInfo 2019-09-04 14:19:23 -07:00
Robin Dunn
1269b712bb Add wxEVT_DPI_CHANGED 2019-09-04 14:14:59 -07:00
Paul Cornett
92cbb02e9f Fix erroneous header click event after double click
See #18490
2019-09-04 11:41:28 -07:00
Maarten Bent
2c27f9851b Check if window is created before getting the display it is on
If it is not initialised, getting the screen rectangle will fail, so
don't even try doing it, but just return wxNOT_FOUND instead, so the
main display will be used -- this is the best we can do if the window
hasn't been created yet, as we don't know on which display it will
appear.

Closes https://github.com/wxWidgets/wxWidgets/pull/1527

Closes #18481.
2019-09-04 00:33:32 +02:00
Vadim Zeitlin
3d73b30b56 Fix recently broken AUI layout
The changes of 5873ee7e4a completely broke
AUI layout as wxAUI code relies on Layout() still performing the layout
even when GetAutoLayout() returns false, but the new wxTLW::Layout()
didn't do anything in this case.

Fix the problem by checking whether we have a sizer or constraints in
this function instead of using GetAutoLayout(), which is supposed to
only be used by wxEVT_SIZE handler to determine if Layout() should be
called in the first place, but not by Layout() itself.

Closes #18486.
2019-09-04 00:28:22 +02:00
Paul Cornett
560c247feb Write PNG image data directly to wxImage buffer when possible
If there is no alpha or mask, copying from an intermediate buffer is not necessary.
2019-09-03 11:12:20 -07:00
Matthew Griffin
2780f1bde6 Added function to protect against null header when getting its height 2019-09-02 10:47:39 +01:00
Artur Wieczorek
991f11707f Convert wxImage with mask to wxBitmap with alpha channel
Since we always convert wxImage to 32 bpp wxBitmap, there is no reason to keep a separate mask for wxBitmap because alpha channel can be used directly.
2019-09-01 11:01:38 +02:00
Artur Wieczorek
9404dc2f9a Fix creating alternate bitmap for toggle wxToolBar button
We need to fill entire area of the alternate button to the transparent colour prior to drawing non-transparent grey background.

Closes #18468.
2019-08-30 00:05:56 +02:00
Artur Wieczorek
8403b79ad7 Fix colours of mask bitmap
Monochrome mask bitmap should have white pixels in the unmasked area and black pixels in the masked area, quite the opposite to what is implemented now.

Closes #10098.
2019-08-30 00:03:37 +02:00
Artur Wieczorek
0522587bcb Fix creating a bitmap representing wxMask
When bitmap data are accessed with wxNativePixelData, which is designed
to handle RGB bitmaps, Alpha() function cannot be used because in this
case alpha component index is set to the default value -1 and actually
the blue component of the "preceding" pixel is accessed.

Closes #18478.
2019-08-29 18:35:14 +02:00
Vadim Zeitlin
417eff2bf8 Add missing wxUSE_MENUS checks to generic MDI classes
Make mdig.cpp compile with wxUSE_MENUS==0, as it already had many
wxUSE_MENUS checks and only missed a few more of them.

See #9626.
2019-08-28 20:11:23 +02:00
Ian McInerney
2f8b2d9a8e Fix deletion of array in fswatcher_inotify 2019-08-28 09:44:55 -07:00
Paul Cornett
df450566dd Avoid including X11 headers from <wx/glcanvas.h>
It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
2019-08-28 09:37:49 -07:00
Maarten Bent
2704d32089 Update wxDPIChangedEvent documentation 2019-08-27 23:06:04 +02:00
Vadim Zeitlin
20b9964007 Avoid warnings about deprecated wxPG_XXX when building wx itself
Getting the warnings about deprecated macros when building the library
itself is not useful, as it must continue to use them as long as
WXWIN_COMPATIBILITY_3_0 exists.

Closes https://github.com/wxWidgets/wxWidgets/pull/1510
2019-08-27 22:21:01 +02:00
Ilya Sinitsyn
1bce1a1d4c Make using non-wxControl-derived wxGrid editors really work
While feacaf8714 changed the API to allow
using any wxWindow (and not only a window of a wxControl-derived class)
as the associated window of the grid editor, actually doing resulted in
an immediate crash due to dereferencing a null pointer in wxGrid code
which still expected to have a wxControl.

Fix this by replacing all calls to wxGridCellEditor::GetControl() inside
wxGrid with wxGridCellEditor::GetWindow(), to ensure that a non-null
editor window is used even in this case.

Closes https://github.com/wxWidgets/wxWidgets/pull/1509
2019-08-27 22:09:03 +02:00