"Alex Eshed" <[EMAIL PROTECTED]> wrote:
> Using MI Pro, a customer wants to be able to rotate an individual symbol
> the same way he does text. That is - click on the symbol and drag the
> image through various angles. Releasing the mouse would fix the symbol
> at its new angle.
If the symbol is based upon a True Type font, you can figure out the
character
whose place the symbol takes and make a TEXT object, which can be rotated
in the way you specified.
function CreateTextFromSym (ByVal m as integer, ByVal x as float, ByVal y as
float, s as Symbol, txo as object) as logical
dim f as string
dim st as smallint
dim a as float
do case StyleAttr (s, SYMBOL_KIND)
case 1 f = "MapInfo Symbols"
a = 0.0
st = 0
case 2 f = StyleAttr (s, SYMBOL_FONTNAME)
a = StyleAttr (s, SYMBOL_ANGLE)
st = StyleAttr (s, SYMBOL_FONT_STYLE)
case 3 note "Sorry, you're out of luck; go buy an image processing
program."
CreateTextFromSym = FALSE
exit function
end case
Set Style Font MakeFont (f, st, StyleAttr (s, SYMBOL_SIZE), StyleAttr (s,
SYMBOL_COLOR), 0)
txo = CreateText (m, x, y, chr$(StyleAttr (s, SYMBOL_CODE)), a,
LAYER_INFO_LBL_POS_CC, 0)
CreateTextFromSym = TRUE
end function
Please remember, however, that a text object will shrink
and grow as you zoom in and out. I'm pretty certain that you can play
around
with buttonpads to create a tool that acts just like the Arrow tool, except
that it
secretly converts a selected point object to a text object and back again.
HTH
Spencer
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.