On 4/1/25 06:06, Ivan Vučica wrote:
On Thu, Jan 2, 2025 at 6:47 PM Ethan C <[email protected]> wrote:
Ivan,
Are you available anytime soon to talk about this or should I wait
for
the next GNUstep monthly meeting?
Thanks,
Ethan C
If you are still interested, I'm available in evenings and over the
weekends (with 1-2d notice), I'm just not following most GNUstep
discussions on mailing lists (apparently even being CCd doesn't make
me spot the email). Sorry about that -- I'll have to review what
mistake I made with the filters.
As I recall, the issue was, at the time, that the contents of the
layer would be drawn at the wrong place. Obviously the layer has its
geometry and position and 3D transforms -- so it expects the contents
to be drawn with no 2D or 3D transforms applied (identity matrix).
I vaguely recall Stjepan and I could not get the backends to draw with
no offset. Bug might be in GNUstep GUI or in GNUstep Back -- it's been
many years and, after all, we didn't quite triage it. You can review
the commits from that era to try to pinpoint where we got stuck. (I'm
saying 'we' because at a later point it turned out to be tricky enough
that we opted for multiple pairs of eyes looking at it, rather than
Stjepan looking on his own.)
Could it be in Opal itself? Opal is in play here mainly because Core
Animation expects a CGContextRef in the standard API. So, any app
ported from the other ecosystem that used Core Animation and
customized drawing would expect a CGContextRef to draw into rather
than use DPS etc. Hence it makes sense that we make AppKit widgets
also draw into CGContextRef, so that people can override widget
drawing using the API they already expect.
Of course, at the end of the day, all that matters is that you get an
RGB / RGBA array with 'contents' into Core Animation. If there's a
different hack that has to be done only for AppKit, we could hack it
in (and the bridge would be the right place to go about it, probably)
-- it just means anyone using Core Graphics APIs directly would be up
for some surprises.
The idea of the bridge is _mainly_ to add a few categories onto NSView
to allow enabling layers, which has a cascade effect of enabling
drawing into a CGContextRef, necessitating use of Opal backend, etc etc.
Let me know what other questions you have and we can also arrange some
meeting, if you still need it.
Ok, thanks! I would probably need to look into Opal, GNUstep
CoreGraphics, and the macOS graphics docs first. Is there a certain
example application that you are trying to get working?