diff libgui/graphics/Backend.h @ 27254:e3d886685813

Let graphics toolkit compute the extent of uicontrol text strings (bug #48446) * graphics-toolkit.h (base_graphics_toolkit::get_text_extent, graphics_toolkit::get_text_extent): New virtual methods. * Backend.h, Backend.cc (Backend::get_text_extent): Reimplement virtual method. Compute the extent based on the string property of uicontrol objects. * graphics.cc (uicontrol::properties::get_text_extent): Use toolkit method rather than a freetype text renderer. * genpropdoc.m: Document the uicontrol "extent" property.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Thu, 11 Jul 2019 15:46:18 +0200
parents 00f796120a6d
children 07b330708e3c
line wrap: on
line diff
--- a/libgui/graphics/Backend.h	Mon Jul 15 13:04:31 2019 -0700
+++ b/libgui/graphics/Backend.h	Thu Jul 11 15:46:18 2019 +0200
@@ -63,6 +63,8 @@
 
     uint8NDArray get_pixels (const graphics_object& go) const;
 
+    Matrix get_text_extent (const graphics_object& go) const;
+
     static Object * toolkitObject (const graphics_object& go);
 
     static ObjectProxy * toolkitObjectProxy (const graphics_object& go);