home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:19059 comp.windows.x.motif:7430
- Newsgroups: comp.windows.x,comp.windows.x.motif
- Path: sparky!uunet!ukma!darwin.sura.net!convex!constellation!geohub.gcn.uoknor.edu!dwight
- From: dwight@geohub.gcn.uoknor.edu (Dwight D. Moore)
- Subject: Re: Draw text centering a point??
- Originator: usenet@kittyhawk.ecn.uoknor.edu
- Sender: usenet@constellation.ecn.uoknor.edu (Usenet Administrator)
- Message-ID: <BxM4v6.6LI@constellation.ecn.uoknor.edu>
- Date: Thu, 12 Nov 1992 17:06:40 GMT
- Reply-To: dwight@geohub.gcn.uoknor.edu
- References: <1992Nov11.201056.9074@magnus.acs.ohio-state.edu>
- Organization: Geosciences Computing Network, Univ. of Oklahoma
- Lines: 29
-
- In article <1992Nov11.201056.9074@magnus.acs.ohio-state.edu>, yhtao@magnus.acs.ohio-state.edu
- (Yu-Hui Tao) writes:
- |
- |>Hi, netters:
- |>
- |> Is there anyway to draw a text in Motif's Drawing area centering one
- |>specific point?
- |>
- |> Any response is apprecitaed!
- |>
- |>Yu-Hui Tao
- |>ISE, OSU
- |>tao@CSEL.eng.ohio-state.edu
- |>===========================
- |>
-
- Use the Xlib XQueryTextExtents(), XTextExtents(), or
- XTextWidth() to determine your string width and use
- that to center your string a a point. Once you
- know the extent, the math is simple...:0)
-
- ----------------------------------------------------------------------------
- Dwight D. Moore
- Geosciences Computing Network
- University of Oklahoma
-
- dwight@geohub.gcn.uoknor.edu (129.15.40.10)
- These opinions do not necessarily represent the opinions of OU or the GCN.
- ----------------------------------------------------------------------------
-