For the sake of compatibility with Cairo (and Direct2D) an initial line segment should be added to the path from the current point (if set) to the beginning of the arc.
Closes#17557
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.
Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
To handle properly all combinations of the start and end angles and to ensure consistency with Cairo renderer behaviour there is necessary
1. To normalize angle values the same way as it is done in Cairo.
and
2. When difference between end angle and start angle >= 2*pi then in addition to the arc itself also one or more full circles have to be added to the path.
See #17558
See #17557
Because wxGraphicsPath comprises current ID2D1PathGeometry object and the collection of transformed (sub-)geometries (ID2D1TransformedGeometry objects) so to concatenate two paths we need to concatenate their current geometries as well as to combine the collections of transformed geometries.
Unfortunately, it seems that this is not a straightforward method to apply transformation to the current underlying path geometry (ID2D1PathGeometry object) "in-place" (ie. transform it and use for further graphics operations). Some simple methods offered by Direct2D are not useful for these purposes:
1. ID2D1Factory::CreateTransformedGeometry() converts ID2D1PathGeometry object to ID2D1TransformedGeometry object and ID2D1TransformedGeometry inherits from ID2D1Geometry (not from ID2D1PathGeometry) and cannot be used for path operations.
2. ID2D1Geometry::CombineWithGeometry() which could be used to get final geometry by combining empty geometry with transformed geometry doesn't offer any combine mode which would produce a "sum" of geometries (D2D1_COMBINE_MODE_UNION gives kind of outline). Moreover the result is stored in ID2D1SimplifiedGeometrySink not in ID2DGeometrySink.
So, it seems that ability to transform the wxGraphicsPath (even several times) and still use it after this operation(s) can be achieved by using a geometry group object (ID2D1GeometryGroup) this way:
1. After applying transformation to the current path geometry with ID2D1Factory::CreateTransformedGeometry() the result is stored in the collection of transformed geometries (an auxiliary array) and after that a new (empty) geometry is open (in the same state as just closed one) and this geometry is used as a current one for further graphics operations.
2. Above steps are done at every transformation so our effective geometry will be a superposition of all previously transformed geometries stored in the collection (array) and the current operational geometry.
3. If there is necessary to use this combined effective geometry in any operation then ID2D1GeometryGroup created with ID2D1Factory::CreateGeometryGroup() from the collection of stored geometries will act as a proxy geometry.
Closes#17549
On Gtk and OS X, but unfortunately not MSW, an assert fails if a
wxFileSystemWatcher is created too early. Therefore give a hint about
where and when one should be created.
Closes https://github.com/wxWidgets/wxWidgets/pull/287
Since resulting wxGraphicPath should have the same state as appended path so we have to grab in wxGraphicsPath::AddPath also auxiliary data from appended wxGraphicsPath.
See #17532
When current point is not set before the call to wxGraphicsPath::AddCurveToPoint() then it should be set at first control point prior to adding a curve (function should behave as if preceded by MoveToPoint).
See #17526
When sub-path is closed with CloseSubpath() then current point should be moved to the joined endpoint of the sub-path (what is equivalent of moving it to the starting point of the sub-path). To implement this behaviour we need to store on our own the starting point of the figure in a dedicate data member because native D2D renderer apparently doesn't offer any support for retrieving it.
See #17520
Circle/ellipse should be appended as a closed sub-path and the current point after the operation should be moved to "the rightmost point" of the figure ((x+r,y) and (x+w,y+h/2) respectively).
See #17520
This class is an implementation detail, only wxWindow is public and there are
never objects of wxWindowBase (but not wxWindow) class in wxWidgets programs.
Closes https://github.com/wxWidgets/wxWidgets/pull/279
Apparently it's a common convention to allow width and/or height of a
rectangle to be negative as both GDI and Cairo handle this natively, so also
allow this for GDI+ and document this as the expected behaviour.
Closes#17495.
This method can be used to change the list view header appearance.
Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
It can be necessary to compare two item attributes for equality, e.g. to check
if the attributes have changed, so provide a straightforward implementation of
equality and inequality operator for it.
The two existing structs were completely identical, just replace them with a
single wxItemAttr.
Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
This partially undoes 0a3057b83c which wrongly
modified the generated interface/wx/stc/stc.h file, as these changes were lost
after regenerating it again.
Unfortunately it doesn't seem possible to have @since annotations for the
Scintilla methods currently, ideally the generator script should be modified
to allow this, somehow.
See #17481.
The function such as fn_str(), wc_str(), and ToAscii() have
configuration-dependent return types, yet different variants were claimed to
be member function overloads. This is incorrect, as a member function cannot
be overloaded only by its return type and, for any given platform/build
variant only one of them is available.
Closes https://github.com/wxWidgets/wxWidgets/pull/260