You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that DrawingBackend:estimate_text_size should accept an &mut self instead of &self.
(Optional) Why this feature is useful and how people would use the feature ?
I think that it's reasonable to expect that a drawing surface needs to alter its state (current font settings) to be able to perform text measurements.
I say this because while adding plotters support for Kludgine, I ended up switching from implementing DrawingBackend directly on my renderer type to implementing it on a RefCell<&mut Renderer<..>>, because my set_font_family function requires &mut self.
If this function accepted an &mut self, I could avoid a second layer of RefCell -- the first layer being the one DrawingArea utilizes already.
The text was updated successfully, but these errors were encountered:
What is the feature ?
I think that
DrawingBackend:estimate_text_size
should accept an&mut self
instead of&self
.(Optional) Why this feature is useful and how people would use the feature ?
I think that it's reasonable to expect that a drawing surface needs to alter its state (current font settings) to be able to perform text measurements.
I say this because while adding plotters support for Kludgine, I ended up switching from implementing
DrawingBackend
directly on my renderer type to implementing it on aRefCell<&mut Renderer<..>>
, because myset_font_family
function requires&mut self
.If this function accepted an
&mut self
, I could avoid a second layer of RefCell -- the first layer being the one DrawingArea utilizes already.The text was updated successfully, but these errors were encountered: