Opened 9 years ago

Closed 7 years ago

#11299 closed enhancement (fixed)

[patch][CCLA] GFX: Complete Text metrics api on Text shapes

Reported by: Chris Mitchell Owned by: Patrick Ruzand
Priority: high Milestone: 1.9
Component: DojoX GFX Version: 1.5.0b2
Keywords: Cc: cjolif, Patrick Ruzand, Brandon Payton, Eugene Lazutkin
Blocked By: Blocking:

Description

The API of GFX Text shapes is currently very limited and lacks some basic functionality.

In particular, getBoundingBox() should return the actual bounds of the text, or there should be another method to return the actual size of the text. Knowing the actual size of the text is necessary to build complex symbols with stacked texts.

Other features that would be desirable are auto-truncation (with "..." ellipsis), and word-wrapping.

Attachments (1)

11299.patch (17.7 KB) - added by Patrick Ruzand 7 years ago.
patch for text bbox, by pruzand (IBM, CCLA)

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by Chris Mitchell

IBM#145317

comment:2 Changed 9 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

comment:3 Changed 8 years ago by cjolif

Cc: cjolif added

Would be useful to git rid of custom code in charts

comment:4 Changed 7 years ago by cjolif

Cc: Patrick Ruzand added

comment:5 Changed 7 years ago by cjolif

Milestone: future1.9

comment:6 Changed 7 years ago by Brian Arnold

Cc: Brandon Payton added

comment:7 Changed 7 years ago by Patrick Ruzand

Cc: Eugene Lazutkin added
Owner: changed from Eugene Lazutkin to Patrick Ruzand

Changed 7 years ago by Patrick Ruzand

Attachment: 11299.patch added

patch for text bbox, by pruzand (IBM, CCLA)

comment:8 Changed 7 years ago by Patrick Ruzand

The above patch adds Text.getBoundingBox() implementation for all renderers. For canvas, it requires the browser implements the fillText/measureText api, which is not the case on (very) old android browsers.

comment:9 Changed 7 years ago by Patrick Ruzand

Summary: GFX: Complete Text metrics api on Text shapes[patch][CCLA] GFX: Complete Text metrics api on Text shapes

comment:10 Changed 7 years ago by Eugene Lazutkin

The patch looks fine to me.

comment:11 Changed 7 years ago by Patrick Ruzand

Resolution: fixed
Status: assignedclosed

In [30989]:

implement Text.getBoundingBox, fixes #11299 !strict

Note: See TracTickets for help on using tickets.