Menu

#144 update to coregraphics (OSX)

open
5
2007-10-30
2003-11-13
No

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?

Discussion

  • Jamie Tittle

    Jamie Tittle - 2003-11-13
     
  • Jim Ingham

    Jim Ingham - 2003-11-22

    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.

     
  • Jim Ingham

    Jim Ingham - 2003-11-22

    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.

     
  • Vince Darley

    Vince Darley - 2004-01-19

    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...?

     
  • Vince Darley

    Vince Darley - 2004-06-01
    • assigned_to: gbjsmith --> wolfsuit
     
  • Jim Ingham

    Jim Ingham - 2004-06-01

    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.

     
  • Vince Darley

    Vince Darley - 2004-08-13

    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?

     
  • Nobody/Anonymous

    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

     
  • Jim Ingham

    Jim Ingham - 2004-08-13

    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.

     
  • Jamie Tittle

    Jamie Tittle - 2004-11-18

    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 :-)

     
  • Jamie Tittle

    Jamie Tittle - 2004-11-18

    XCopyArea, XPutImage, XCopyPlane now CGized!

     
  • Nobody/Anonymous

    Logged In: NO

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

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-30
    • assigned_to: wolfsuit --> das
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-30

    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.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.