MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Packages--JLink graphic string width and height in pixels

Not exactly sure what you're wanting to do, but if you want to frame a box of
text with a precise width in mathematica graphics, it isn't too difficult
to do in mathematica.  Consider this example:


myMessage="A moment of planetary concordance occurs when the Kepler harmonies
fit closely into a known musical scale. Here, the scale used is the equal
tempered chromatic, typical of Western music."


where myWidth*p sets the width of the myMessage and the width of the overall
 image.  Smaller widths don't result in smaller text, but at least the text
will wordwrap within the box.  By adjusting the the Scaled[] coordinates and
 the p=percent of image width you can format fairly neatly. 


-----Original Message-----
From: lucb at
To: mathgroup at
Subject: [mg62955] [mg62911] Packages--JLink graphic string width and height in pixels

has anyone used JLink to calculate the width and height (in pixels) of a string
to be used in a mathematica 2D graphics?

Link to the forum page for this post:
Posted through [[postId=6748]]

  • Prev by Date: Re: Getting good results with NDSolve?
  • Next by Date: UML-like diagrams for Mathematica
  • Previous by thread: Packages--JLink graphic string width and height in pixels
  • Next by thread: How to hide a cell?