Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Simon Urbanek
Since I'm working with Paul on the glyph changes to the R graphics engine I'm quite interested in this so I had the idea to take out the guts from my Cairo package into a self-contained C code. Your request is good to bump is up on my stack. I already have code that draws text into OpenGL textur

Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Duncan Murdoch
I'm somewhat aware of how tricky it all is. For now I'm going to do it in R (usng textshaping for layout and base graphics on the ragg::agg_capture device to draw to the bitmap). I'll avoid allowing changes to happen in the C++ code. Eventually I'll see if I can translate the code into C++.

Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Simon Urbanek
Duncan, drawing text is one of the most complicated things you can do, so it really depends how for you want to go. You can do it badly with a simple cairo show_text API. The steps involved in doing it properly are detecting the direction of the language, finding fonts, finding glyphs (resolvin

[Rd] Suggestion: User defined sampling

2023-09-24 Thread Ralf Stubner
Hi everybody, Currently one can alter R's random number generation via RNGkind() in three aspects: the RNG itself, the method for drawing from the normal distribution and the method for generating integers within a range. For the first and second aspect it is possible to supply user defined method

Re: [Rd] NROW and NCOL on NULL

2023-09-24 Thread Simone Giannerini
Thank you for your comment, On Sat, Sep 23, 2023 at 9:51 PM Ben Bolker wrote: > > This is certainly worth discussing, but there's always a heavy > burden of back-compatibility; how much better would it be for NCOL and > NROW to both return zero, vs. the amount of old code that would be broken