Extended tests to determine speed of drawing RGB/ARGB bitmaps on target
bitmaps with different colour depths (RGB/0RGB/ARGB/system default).
See #16766.
Don't use upper-case file names, while MSW itself is case-insensitive, wxMSW
can be also cross-compiled and then the wrong case results in compilation
errors.
Closes#17279.
Call wxDC::GetPartialTextExtents() once instead of calling GetTextExtent() for
each letter in a loop in wxHtmlWordCell code. This is more efficient and more
precise and was done for wxOSX since 89e94a4bff
10+ years ago, but for some reason wasn't done for the other platforms.
Show Travis and AppVeyor build results of the master branch in the
readme (and project page). Use images from shields.io so shields
look the same and a label can be added.
Closes#140
Since 44bcc3a723 wxRendererGeneric::DrawItemText()
could call Ellipsize() with wxELLIPSIZE_NONE mode, resulting in an assert.
Fix this by just not doing anything in this case.
Closes#125.
This reverts commit d04e256993 because it
results in crashes due to writing out of bounds of the bitmap: nothing
guarantees that the entire (x, y, dstWidth, dstHeight) rectangle fits in the
destination bitmap and so the code of this commit could merrily overflow it
and did it as could be seen e.g. in the HTML test sample after scrolling
around a little.
See #16766.
The existing code tried writing to HKEY_CLASSES_ROOT which doesn't work, in
general, for normal, i.e. non administrator, users, under any post-XP versions
of Windows.
Fix it to write to HKEY_CURRENT_USER\Software\Classes, which is the part of
HKEY_CLASSES_ROOT for the current user and to which we do have write access,
and only continue to use HKEY_CLASSES_ROOT itself for reading.
Fix the call to wxControl::Ellipsize() inside DrawItemText() added in
b7a89f8746 (see #16414) which removed all
ampersands from the string with the default flags to not do it.
Closes#17269.
This method was confusing and dangerous as it didn't actually initialize the
wxColour object because it didn't set its m_cgColour and so attempting to use
wxColour "initialized" using this method resulted in a crash whenever its
GetPixel(), GetCGColor() or CreateCGColor() methods were called.
Just merge this function with InitCGColorRef() which is the only remaining
place where it's used after rewriting wxColour(NSColor) ctor.
Some colours returned in wxSystemSettingsNative::GetColour() can't be
represented in RGBA color space as they use patterns, which explained why the
compilation fix for 10.7 SDK in 56ebe6dfac
resulted in run-time crashes.
Add code to support converting such NSColor objects to CGColorRef via
NSImage, CGImageRef and CGPatternRef to make things really work.
See #17141
wxColour ctor from NSColor added in b478f24288
didn't work correctly as it didn't initialize wxColour::m_cgColour and so any
attempts to use the colour created by it resulted in an immediate crash (so
the code added in 16671f229a likely didn't work
neither).
It also assumed that the NSColor given to it was always in the RGBA colorspace
and crashed if it wasn't (so 56ebe6dfac fixed
compilation at the price of making the code crash at run-time). Now explicitly
request the RGBA colorspace and leave the colour uninitialized, which is
better than crashing, if it can't be obtained.
After making this ctor safe to use, there is no reason to reproduce its logic
in wxColourDialog and wxFontDialog, so just use it from there.
Also make the ctor explicit as it's a non-trivial operation which shouldn't be
performed implicitly and document that it doesn't take ownership of NSColor,
unlike the similar ctor from CGColorRef.
Really print the selected pages and not the pages explicitly listed in the
"Pages" text entry field in the MSW native print dialog when "Selection" radio
button is checked.
Closes#17266, #17200.