Calculate width of Charsequence Text
Uses Java Function measureText(charSequence , int Start, int End)
' textSize is default textsize of label where charsequence is displayed
Sub getWidthofCS(cx As Object,textSize As Float) As Float
Dim jo As JavaObject = Me
Return...
Hello,
I know it isn't wanted to re-ask the same question, but I do... Please for give me.
Can someone put me in the right direction by calculating StringWidth.
I mean the lenght in pixels, units or some value from any string in a specified font.
Maybe I can draw a string on a blanc...
I made some simple functions for easy writing on top of an existing PDF.
Thanks to DonManfred post: PDFBox post#4
I need to calculate stringwidth for center align and right align.
On StackOverflow I found the stringwidth could by calculated with a function at font object.
But in the for B4J...
If there a "conflict" between 9Patch and canvas MeasureStringWidth or, as always :D, I'm doing something wrong?
If I use canvas MeasureStringWidth after applying the 9 patch I get a strange result (see the attached project, please).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.