Tk Source Code

View Ticket
Login
Ticket UUID: 841244
Title: update to coregraphics (OSX)
Type: Patch Version: None
Submitter: tigital Created on: 2003-11-13 06:49:44
Subsystem: 66. Aqua Window Operations Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2018-02-18 22:09:31
Resolution: Out of Date Closed By: fvogel
    Closed on: 2018-02-18 22:09:31
Description:
this is a diff against 11/12/2003 cvs

basically it just makes some changes to tkMacOSXDraw.c

by switching the variable "useCGDrawing" at the top of the 
file, you can switch back and forth between quickdraw and 
coregraphics...

unfortunately, it doesn't cover pixmaps (yet)

...or get rid of copybits (yet)

...but, it does help out with a bit with primitive drawings 
(rectangles, lines, arcs, polygons)

tested with 10.2.6-10.2.8

...known bugs:  

- stipples don't work
- antialiasing:  when should it kick in?
- others?
User Comments: hobbs added on 2007-10-31 02:07:55:
Logged In: YES 
user_id=72656
Originator: NO

I'm not sure what is left that isn't implemented in 8.5, but referring to das.

nobody added on 2006-03-19 01:50:18:
Logged In: NO 

What's the status of this?  Are there still more CG bits of
this patch to go in?

tigital added on 2004-11-19 06:28:51:

File Added - 109293: tkMacOSXDrawCG.diff

tigital added on 2004-11-19 06:28:50:
Logged In: YES 
user_id=634044

this second patch is against the core-8-4-branch HEAD, but
works on 8.5a2 also...

It adds CGcontext versions of XCopyArea, XCopyPlane, and
XPutImage

...atm, there are issues with drawing things upside down,
which apparently comes from using these routines an even
number of times:  this is due to the screen transform in the
context setup routine, compensating for the different QD/CG
coordinate systems, so I'm guessing this patch won't be
truly useful until we've switched fully over to CGContext's?

...as usual, it definitely needs a going over by someone to
make sure I'm not totally insane :-)

wolfsuit added on 2004-08-14 00:10:53:
Logged In: YES 
user_id=169107

The code actually checked in is different in a couple of substantial, and a 
bunch of formal ways.  I will import this onto TOT when I get a free 
couple of hours.

nobody added on 2004-08-13 20:35:04:
Logged In: NO 

yes, this is the basis for what was added to 8.4.7, and it
also works against 8.5...several things were added in the
8.4.7 commit that should be added when imported to 8.5:
- a small bug in CGContext setup was fixed
- jim added a tcl variable that sets "use_cgdrawing" so that
it can be turned on/off

vincentdarley added on 2004-08-13 17:20:10:
Logged In: YES 
user_id=32170

Is this what has been committed against Tk 8.4?  Is it
planned to commit against 8.5 as well?

wolfsuit added on 2004-06-02 01:15:27:
Logged In: YES 
user_id=169107

As I understand it, there was only the question about what to do with 
anti-aliasing for narrow lines.  There was some discussion a while back 
about this.  It would also be great to have another pair of eyes look it 
over.  I won't be able to look at any Tk stuff till after WWDC.

vincentdarley added on 2004-01-20 01:49:41:
Logged In: YES 
user_id=32170

What's the status of this patch? Should it be committed as a
valuable first step, or does it need more work, or is it
buggy or...?

wolfsuit added on 2003-11-22 07:53:19:
Logged In: YES 
user_id=169107

Jamie, I looked over this patch some.  For the most part it looked 
good.  One thing I noticed noodling around in the widget demo 
(particularly resizing windows) is that the clipping regions were 
not right.  I think this is because you were calling 
ClipCGContextToRegion AFTER you had transformed the 
coordinates.  But I think this call assumes you are still using native 
CG coordinates.  Anyway, when I move this block up before the 
transform, the clipping in now correct, resizes look good, etc.

I also compulsively changed a bunch of formatting...  This is a diff 
against the current CVS TOT.

The Canvas drawing in particular looks LOTS nicer.

wolfsuit added on 2003-11-22 07:26:15:
Logged In: YES 
user_id=169107

Jamie, I looked over this patch some.  For the most part it looked 
good.  One thing I noticed noodling around in the widget demo 
(particularly resizing windows) is that the clipping regions were 
not right.  I think this is because you were calling 
ClipCGContextToRegion AFTER you had transformed the 
coordinates.  But I think this call assumes you are still using native 
CG coordinates.  Anyway, when I move this block up before the 
transform, the clipping in now correct, resizes look good, etc.

I also compulsively changed a bunch of formatting...  This is a diff 
against the current CVS TOT.

The Canvas drawing in particular looks LOTS nicer.

tigital added on 2003-11-14 01:16:50:

File Added - 67411: OSXtkCGdraw.diff

Attachments: