|
From: Christopher C. <chr...@gm...> - 2025-10-01 13:39:10
|
Hello Andrew, I am just a Tk Aqua contributor (I can't answer authoritatively as Tk Aqua maintainers Marc Culler and Kevin Walzer can), but this is still an interesting question. I think an approach which might work in the short term would be to create a pixmap, get the CGContext for the pixmap using Tk_MacOSXGetCGContextForDrawable(), do the necessary drawing into the pixmap's CGContext, then use XCopyArea() to copy the pixmap into the widget. I am aware there are currently some issues with e.g. XCopyArea(), however I am not aware what could be causing Tk_MacOSXGetCGContextForDrawable() to segfault in your case. While there is currently not any intention to expose pixmap or window CGContexts to extensions, having a useful API to access them should not be too difficult either. Also be aware that Tk Aqua 8.6 will soon be end-of-life, and Tk Aqua 9.0 will probably accommodate your use case better anyway, especially if a new or revised API is needed, or if you want Retina-aware drawing directly into a window rather than through a pixmap. If you can share your project code, I would be interested in taking a look or giving it a try. Hope this helps Christopher Links to Andrew's messages and StackOverflow question, for reference: https://sourceforge.net/p/tcl/mailman/tcl-core/thread/CAOWyT84LoZkW%2BNENLr3Ppn7-oHmhf6V-XgT7uoQ5hX%3D8-CWREw%40mail.gmail.com/ https://sourceforge.net/p/tcl/mailman/tcl-core/thread/818dac7a-08cb-4df6-b1e9-856b2b6d39c7%40gmail.com/#msg59239381 https://stackoverflow.com/q/79774074/4896937 |