The clippling bug in the cocoa canvas has been fixed by Dmitry. In my own tests, series color selection should work now in cocoa. Please test yourself and report back.
Note: you need Lazarus trunk to get the fix. Alternatively - without warranty - you could do this:
- Open cocoagdiobject.pas in folder lcl/interfaces/cocoa of your Lazarus installation and find procedure TCocoaContext.ClearClipping.
- At the end of the "if" block insert the lines "if Assigned(FPen) then FPen.Apply(Self)" and "if Assigned(FBrush) then FBrush.Apply(Self)".
- The entire procedure should be as follows. Afterwards rebuild the IDE.
procedure TCocoaContext.ClearClipping;
var
Trans: CGAffineTransform;
cgc: CGContextRef;
begin
if FClipped then
begin
cgc := CGContext();
Trans := CGContextGetCTM(cgc);
CGContextRestoreGState(cgc);
ApplyTransform(Trans);
if Assigned(FPen) then FPen.Apply(Self); // <----- INSERTED
if Assigned(FBrush) then FBrush.Apply(Self); // <----- INSERTED
end;
end;
As I said -- I cannot give a guarantee that this change does not depend on other changes missing. So, please make a backup copy of the modified file so that you can restore the old state in case Lazarus does not compile.