Search
Thursday, 26th of April 2018, 19:17:25 UTC
3:17:49
beach
Good morning everyone!
4:00:04
loke
Nothing much. Been thinking about how to deal with output records recordingtrnasformations
4:00:26
loke
I managed to do it, but it was so ugly that I didn't even want to commit it as a work-in-progress (I don't want any record of me actually writing that code)
4:00:49
loke
https://gist.github.com/lokedhs/792f6c8b2a500f772be7a05032cafb22
4:01:26
loke
Note how I use a dynamic variable to pass the override transformation to be used by the text rendering
4:02:23
loke
What I really need is to ament the MEDIUM-DRAW-TEST function to accept a transformation
4:02:35
loke
I'm considering doing that right now.
4:02:55
beach
I assume you meant TEXT, right?
4:24:56
loke
I'm looking at the class COMPLETE-MEDIUM-STATE
4:25:14
loke
It mixes in a few other states, such as INK, CLIP and LINE-STYLE
4:25:42
loke
at first I thought that transformation should belong there too, but no... that wouldn't work.
4:26:03
loke
I can't think of any solution other than changing the interface of MEDIUM-DRAW-TEXT to accept a transformation
4:26:44
beach
We should consider changes like that. It is not as though we have to support some legacy software that does arbitrary stuff.
4:27:12
beach
I mean "consider", i.e. we should think about it and not be tied too much to the specification.
4:37:45
loke
Someone, at some point, implemented proper transformations for the postscript engine, but it was rolled back because the “spec”
4:38:15
loke
It honestly makes no sense to me... I'll link you:
4:38:54
loke
https://github.com/lokedhs/McCLIM/blob/freetype2/Backends/PostScript/graphics.lisp#L562
4:45:47
loke
My opinion is that the spec is incomplete. Broken, if you want to be blunt, in this case.
4:46:21
loke
...which is why I intedn to extend the specification of MEDIUM-DRAW-TEXT to take a transformation into account.
4:46:31
beach
Or, let's say it took into account the realities of the time.
4:46:40
loke
I guess at the time when this code was written, only postscript had the ability to transform text.
4:46:56
loke
See my previous message :-)
4:47:49
loke
This was around y2k, and I think then, most font rendering was still using bitmaps.
4:48:02
loke
This has compeltely changed some two decades later.
4:49:18
loke
beach: Is there a difference between (SHEET-NATIVE-TRANSFORMATION (MEDIUM-SHEET <medium>)) and (MEDIUM-TRANSFORMATION <medium>) ?
4:50:21
loke
beach: What are those differences? So far, I only ever paid any attention to the latter.
4:50:37
beach
Let's see if I remember.
4:51:22
beach
The latter is used to transform from coordinates given to (draw-...) to sheet coordinates.
4:51:47
beach
The former has to do with the transformation between sheets.
4:52:01
loke
beach: Yes. That' smy understanind (and making that assumption makes my text drawing work :-) )
4:53:33
beach
Let me dig up the definitions.
4:56:35
beach
Give me a few minutes.
5:00:28
beach
No, it's fine. I need to brush up on this stuff.
5:01:03
beach
The native transformation transforms between the sheet coordinate system and the coordinate system of the (not necessarily direct) mirror of the sheet.
5:01:13
beach
You should not have to worry about that one.
Friday, 27th of April 2018, 7:17:25 UTC