home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 19059 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.5 KB

  1. Xref: sparky comp.windows.x:19059 comp.windows.x.motif:7430
  2. Newsgroups: comp.windows.x,comp.windows.x.motif
  3. Path: sparky!uunet!ukma!darwin.sura.net!convex!constellation!geohub.gcn.uoknor.edu!dwight
  4. From: dwight@geohub.gcn.uoknor.edu (Dwight D. Moore)
  5. Subject: Re: Draw text centering a point??
  6. Originator: usenet@kittyhawk.ecn.uoknor.edu
  7. Sender: usenet@constellation.ecn.uoknor.edu (Usenet Administrator)
  8. Message-ID: <BxM4v6.6LI@constellation.ecn.uoknor.edu>
  9. Date: Thu, 12 Nov 1992 17:06:40 GMT
  10. Reply-To: dwight@geohub.gcn.uoknor.edu
  11. References:  <1992Nov11.201056.9074@magnus.acs.ohio-state.edu>
  12. Organization: Geosciences Computing Network, Univ. of Oklahoma
  13. Lines: 29
  14.  
  15. In article <1992Nov11.201056.9074@magnus.acs.ohio-state.edu>, yhtao@magnus.acs.ohio-state.edu
  16. (Yu-Hui Tao) writes:
  17. |
  18. |>Hi, netters:
  19. |>
  20. |>  Is there anyway to draw a text in Motif's Drawing area centering one
  21. |>specific point?
  22. |>
  23. |>  Any response is apprecitaed!
  24. |>
  25. |>Yu-Hui Tao
  26. |>ISE, OSU
  27. |>tao@CSEL.eng.ohio-state.edu
  28. |>===========================
  29. |>
  30.  
  31. Use the Xlib XQueryTextExtents(), XTextExtents(), or
  32. XTextWidth() to determine your string width and use
  33. that to center your string a a point.  Once you
  34. know the extent, the math is simple...:0)
  35.  
  36. ----------------------------------------------------------------------------
  37. Dwight D. Moore
  38. Geosciences Computing Network
  39. University of Oklahoma
  40.  
  41. dwight@geohub.gcn.uoknor.edu (129.15.40.10)
  42. These opinions do not necessarily represent the opinions of OU or the GCN.
  43. ----------------------------------------------------------------------------
  44.