← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew: OS X cursor shape cannot be changed in any of the view

 

From your link (and there going to the Apple docs):
<<<
kCGBlendModeXOR
R = S*(1 - Da) + D*(1 - Sa). This XOR mode is only nominally related to the classical bitmap XOR operation, which is not supported by Quartz 2D.
>>>
And the bug reports all report the same… it is not supported on OS X.
Yes, I did that googling quite some days over christmas.

Yes, there are some things being somewhat similar to usual XOR.
But (and I may totally wrong here, like probably all others who introduced the Overlay stuff for that reason or did not implement it in wxWidgets), all of those don’t work like the usual XOR, i.e., you can’t remove things by just drawing twice.

If somebody shows me how to do that on OS X and the legacy canvas will be there long enough so that it is worth fixing (at least, for eeschema), I will happily try to patch that into wxWidgets…


Regards
Bernhard


> On 22 Jul 2015, at 15:09, Bob Gustafson <bobgus@xxxxxxx> wrote:
> 
> If you do a Google search on:
> 
>      XOR draw mode on OS X
> 
> There are a lot of notes and bug reports.
> 
> This one might have some useful hints:
> 
>       http://stackoverflow.com/questions/8951679/drawing-with-xor-in-quartz <http://stackoverflow.com/questions/8951679/drawing-with-xor-in-quartz>
> 
> Hope this helps
> 
> Bob G
> 
> On 07/22/2015 12:47 AM, Bernhard Stegmaier wrote:
>> 
>>> On 22 Jul 2015, at 05:10, Garth Corral < <mailto:gcorral@xxxxxxxxx>gcorral@xxxxxxxxx <mailto:gcorral@xxxxxxxxx>> wrote:
>>> 
>>> 
>>>> On Jul 21, 2015, at 1:30 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>> 
>>>> On 7/21/2015 4:19 PM, Bernhard Stegmaier wrote:
>>>>> OK, got it… the crosshair is only shown in some modes (didn’t really use
>>>>> GAL up to now).
>>>>> Yes, works also for me in GAL mode and not in default canvas.
>>>> 
>>>> I'm not sure why this doesn't work in the default canvas.  Someone
>>>> should probably take a look at it.  I'm guessing it has something to do
>>>> with the overlays used on OSX.
>>>> 
>>> 
>>> Um, perhaps it has something to do with this:
>>> 
>>> #ifdef __WXMAC__
>>>     m_defaultCursor = m_currentCursor = wxCURSOR_CROSS;
>>>     m_showCrossHair = false;
>>> #else
>>>     m_defaultCursor = m_currentCursor = wxCURSOR_ARROW;
>>>     m_showCrossHair = true;
>>> #endif
>>> 
>>> I’m assuming that this was done due to overlay issues as Wayne suggests.
>> 
>> You don’t have a XOR-drawing mode on OS X with wxWidgets, so the usual redraw-to-delete doesn’t work here.
>> If you want to delete something you have to completely repaint the canvas or revert the the last state saved in the overlay (which is faster than a complete redraw but still not as fast as just drawing two lines).
>> 
>> If I haven’t tried yet, but if you just remove that ifdef I guess deletion of the crosshair won’t work at all (you would just fill up the canvas with crosshairs). Or, it could be quite slow (there is already now some noticeable lag when quickly moving around objects).
>> However, I can give it a try on the weekend...
>> 
>> So, the real issue is not to have a XOR draw mode on OS X, which is quite the base of every drawing stuff in the default canvas of pcbnew and eeschema. Using this overlay hack is just a workaround with many problems (especially causing all those redraw issues in eeschema)...
>> 
>> 
>> Regards,
>> Bernhard
>> 
>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
> 


References