Opened 9 months ago

Closed 9 months ago

#15628 closed defect (fixed)

Magenta defined twice

Reported by: R.U.10 Owned by:
Priority: normal Milestone:
Component: base Version: 2.9.4
Keywords: MAGENTA wxColourTable gdicmn.cpp Cc:
Blocked By: Blocking:
Patch: no

Description

In gdicmn.cpp, the wxColourTable lists the magenta color twice with a different name:

        {wxT("LIGHT MAGENTA"), '''255, 0, 255'''},
        {wxT("MAGENTA"), '''255, 0, 255'''},

This poses a problem when dealing with the name of the wxColour:

wxColour theColor("MAGENTA");
wxString theFoundName = wxColourDatabase::FindName(theColor);

theFoundName contains "LIGHT MAGENTA"!

Change History (1)

comment:1 Changed 9 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [75112]) Fix light magenta definition in the colour database.

Make it different from magenta itself, otherwise a colour constructed from
"magenta" string was returning "light magenta" as its name.

The exact value of this colour is not well-defined, another commonly used one
seems to be 0xff80ff, but in a lot of places it is used as a synonym for
fuchsia pink which is pretty unambiguously 0xff77ff.

Closes #15628.

Note: See TracTickets for help on using tickets.