← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Change from EDA_COLOR_T to COLOR4D and arbitrary color support

 

Thanks Chris.
That line was hidden inside an #if block that only compiles for Mac, so
it's possible there are others that also need to be fixed -- anywhere
expecting a wxColour will now get COLOR4D and needs the ".ToColour()"
added.  Unfortunately I can't search through the code right now, but will
also be more available in ~6 hours

-Jon

On Wed, Feb 22, 2017 at 1:59 PM, Chris Pavlina <pavlina.chris@xxxxxxxxx>
wrote:

> I'll have a look at MacOS build tonight if Diogo doesn't figure it out
> first.
>
> On Feb 22, 2017 1:57 PM, "Jon Evans" <jon@xxxxxxxxxxxxx> wrote:
>
>> Hi Diogo,
>>
>> Unfortunately I cannot test on Mac OS at all, and can't test on any
>> platform this minute.
>> But, I think you have to change that line to:
>>
>> wxPen pen( GetParent()->GetGridColor().ToColour(), h );
>>
>> -Jon
>>
>> On Wed, Feb 22, 2017 at 1:05 PM, Diogo Condeço <diogocondeco@xxxxxxxxx>
>> wrote:
>>
>>> Hi Jon,
>>>
>>> Your patch 0001 on this thread introduced a bug which makes kicad unable
>>> to build...
>>>
>>> a52250a91e24733ce798ad8baa4597032d49d11e this was the commit.
>>>
>>> kicad/common/draw_panel.cpp:757:15: error: no matching constructor for initialization of 'wxPen'
>>>         wxPen pen( GetParent()->GetGridColor(), h );
>>>
>>>
>>> This is on a macos machine with clang.
>>>
>>> Thanks,
>>>
>>> Diogo
>>>
>>>
>>> On Wed, Feb 22, 2017 at 4:56 PM, Maciej Sumiński <
>>> maciej.suminski@xxxxxxx> wrote:
>>>
>>>> Great, so now they are in the master repository. Thank you for the
>>>> patches.
>>>>
>>>> Regards,
>>>> Orson
>>>>
>>>> On 02/22/2017 02:10 PM, Jon Evans wrote:
>>>> > Yes, they are ready to merge.
>>>> >
>>>> > Best,
>>>> > Jon
>>>> >
>>>> > On Feb 22, 2017 03:37, "Maciej Sumiński" <maciej.suminski@xxxxxxx>
>>>> wrote:
>>>> >
>>>> >> I got a response from Wayne saying he is ok with the changes (I
>>>> suppose
>>>> >> the mail was meant to be sent here). Do you think the patches ready
>>>> to
>>>> >> be merged? They seem complete to me, but I just want to confirm.
>>>> >>
>>>> >> Regards,
>>>> >> Orson
>>>> >>
>>>> >> On 02/20/2017 06:55 PM, Jon Evans wrote:
>>>> >>> Thanks Orson, no I don't mind changing to static consts!
>>>> >>>
>>>> >>> Best,
>>>> >>> Jon
>>>> >>>
>>>> >>> On Mon, Feb 20, 2017 at 12:50 PM, Maciej Sumiński <
>>>> >> maciej.suminski@xxxxxxx>
>>>> >>> wrote:
>>>> >>>
>>>> >>>> Hi Jon,
>>>> >>>>
>>>> >>>> I have just tested the patch, and I really like it. I just need to
>>>> test
>>>> >>>> it a bit longer, as there are numerous changes, but I am in favor
>>>> of
>>>> >>>> merging the patch.
>>>> >>>>
>>>> >>>> I also applied one more patch changing a few defines (UNSPECIFIED,
>>>> >>>> BLACK, WHITE) to static consts, I hope you do not mind.
>>>> >>>>
>>>> >>>> If there are other people interested in testing, I have rebased the
>>>> >>>> changes [1] on the current master. There are also a few minor code
>>>> >>>> formatting fixes.
>>>> >>>>
>>>> >>>> Regards,
>>>> >>>> Orson
>>>> >>>>
>>>> >>>> 1. https://code.launchpad.net/~orsonmmz/kicad/+git/kicad/+ref/c
>>>> olors
>>>> >>>>
>>>> >>>> On 02/18/2017 09:24 PM, Jon Evans wrote:
>>>> >>>>> Hi all,
>>>> >>>>>
>>>> >>>>> Attached is a follow-up patch to the COLOR4D change above -- I
>>>> reverted
>>>> >>>>> from using wxColourPickerCtrl back to wxBitmapButton in the
>>>> eeschema
>>>> >>>> color
>>>> >>>>> config, because I finally got my Windows 10 testing environment
>>>> set up,
>>>> >>>> and
>>>> >>>>> found out that for some reason wxColourPickerCtrl looks really
>>>> ugly in
>>>> >>>>> Windows 10.
>>>> >>>>>
>>>> >>>>> Best,
>>>> >>>>> Jon
>>>> >>>>>
>>>> >>>>> On Fri, Feb 10, 2017 at 8:43 PM, Jon Evans <jon@xxxxxxxxxxxxx>
>>>> wrote:
>>>> >>>>>
>>>> >>>>>> Hi all,
>>>> >>>>>>
>>>> >>>>>> Attached is a (rather large!) patch that changes the internal
>>>> color
>>>> >>>>>> representation to COLOR4D across the codebase (except for places
>>>> that
>>>> >>>>>> directly deal with wx, where wxColour is used).
>>>> >>>>>>
>>>> >>>>>> This patch also enables arbitrary color selection for schematic
>>>> and
>>>> >>>> symbol
>>>> >>>>>> library editor, as well as pcbnew in the GAL canvas.  GerbView
>>>> and
>>>> >>>> pcbnew
>>>> >>>>>> legacy canvas still use the old color picker.  Colors will be
>>>> coerced
>>>> >>>> into
>>>> >>>>>> the legacy palette when switching from GAL to legacy, in a way
>>>> that
>>>> >>>> tries
>>>> >>>>>> to preserve the hue and value.
>>>> >>>>>>
>>>> >>>>>> Colors are serialized to the settings in CSS format, because it
>>>> >> supports
>>>> >>>>>> alpha and represents color components the same way COLOR4D does
>>>> (as
>>>> >>>>>> floating-point values from 0 to 1)
>>>> >>>>>>
>>>> >>>>>> Tested on Linux.  Can't test on Windows or Mac yet, sorry.
>>>> >>>>>> I realize this is a large changeset and might take a while to
>>>> review,
>>>> >> so
>>>> >>>>>> just ping me if it stops applying on master and I'll update it.
>>>> >>>>>>
>>>> >>>>>> Best,
>>>> >>>>>> Jon
>>>> >>>>>>
>>>> >>>>>
>>>> >>>>>
>>>> >>>>>
>>>> >>>>> _______________________________________________
>>>> >>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> >>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> >>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> >>>>> More help   : https://help.launchpad.net/ListHelp
>>>> >>>>>
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>> _______________________________________________
>>>> >>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> >>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> >>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> >>>> More help   : https://help.launchpad.net/ListHelp
>>>> >>>>
>>>> >>>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >>
>>>> >> _______________________________________________
>>>> >> Mailing list: https://launchpad.net/~kicad-developers
>>>> >> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> >> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> >> More help   : https://help.launchpad.net/ListHelp
>>>> >>
>>>> >>
>>>> >
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Diogo Condeço
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>

Follow ups

References