| Store | Cart

Re: [TCLCORE] TIP #510 - what are our options?

From: Donal K. Fellows <dona...@manchester.ac.uk>
Thu, 1 Nov 2018 11:34:16 +0000
On 01/11/2018 01:39, Steve Landers wrote:
> Donal has been investigating and reports (on tkchat) that rbc mostly > does use the generic code.  He’s identified the main exception being the > rotated text engine (which could and should be changed to use Tk’s > equivalent).> > I’ll leave Donal to fill in the details once he finishes investigating.

There's some platform-specific code elsewhere, and I'm pretty sure that 
some of the assertions in the code (to justify the complexity of 
platform-specific code) are actually false in Tk these days. For 
example, Tk now knows about dashes in GCs.

Platform specific-ness is in (file — functions):

   rbcGrLine.c — DrawCircles, DrawTraces
   rbcGrMisc.c — RbcGetPrivateGCFromDrawable, RbcSetDashes
   rbcGrPs.c —   CreateWindowsEPS, StringToFormat, OutputOp
   rbcGraph.c —  InitMetaFileHeader/CreateAPMetaFile, StringToFormat,
                 SnapOp
   rbcPs.c —     RbcBitmapDataToPostScript, RbcFontToPostScript,
                 NameOfAtom
   rbcText.c —   CreateTextBitmap, RbcDrawTextLayout
   rbcTile.c —   RedrawTile, TileRegion
   rbcWindow.c — GetWindowSize

plus the obvious files:

   rbcInt.h
   rbcUnixImage.c
   rbcWin.h
   rbcWinDraw.c
   rbcWinImage.c

The majority of the platform-specific code appears to be:

  1: adaptations of drawing code (at its most extreme in rbcText.c) to 
provide things like dashes and rotated text where we should audit 
against current Tk.
  2: adaptations of “postscript” generation to support Windows's 
platform-specific formats. (I believe that macOS will be mainly happy 
with what the X11 side does here anyway, or maybe all those formats 
ought to be supported on all platforms.)
  3: special code for things like “snap” where the functionality ought 
to be part of base Tk.

The drawing code is the most awkward to port, but is also the most 
likely to have been entirely overtaken by changes to Tk. Some of the 
code in there looks very old...

Donal.

begin:vcard
fn:Donal K. Fellows
n:Fellows;Donal
org:The University of Manchester;School of Computer Science
adr:;;Oxford Road;Manchester;;M13 9PL;United Kingdom
email;internet:dona...@manchester.ac.uk
version:2.1
end:vcard


_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Kevin Kenny Oct 31, 2018 01:12 am
Zaumseil René Oct 31, 2018 08:12 am
Donal K. Fellows Oct 31, 2018 10:20 am
Zaumseil René Oct 31, 2018 10:39 am
Peter Da Silva Oct 31, 2018 12:34 pm
Kevin Walzer Nov 01, 2018 01:34 am
Steve Landers Nov 01, 2018 01:39 am
Donal K. Fellows Nov 01, 2018 11:34 am
Zaumseil René Nov 01, 2018 06:45 am
Messages in this thread