Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


how can I write text on full rectangle



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> Illustrator Forum
View previous topic :: View next topic  
Author Message
oleg.shast



Joined: 24 Apr 2008
Posts: 4

PostPosted: Thu Apr 24, 2008 11:32 pm    Post subject: how can I write text on full rectangle Reply with quote

i.e. I have width/height of text, which must be written, i.e. 100/300 and I want to write a text "HELLO". How can I write text such as that text will be with width=100 and height=300 ?

I try following:

Illustrator.CharacterStyle curStyle = curDok.CharacterStyles.Add("ColorText");
Illustrator.CharacterAttributes charAttr = curStyle.CharacterAttributes;
charAttr.FillColor = ilColor;
charAttr.Size = Convert.ToInt32(FontSize * 2.5F);
//charAttr.HorizontalScale = charAttr.HorizontalScale;
//charAttr.VerticalScale = charAttr.VerticalScale;
Illustrator.TextFont newFont = null;
if (!string.IsNullOrEmpty(sFont))
foreach (Illustrator.TextFont curFont in appIll.TextFonts)
if (curFont.Name.Contains(sFont))
newFont = curFont;
if (newFont != null)
charAttr.TextFont = newFont;

double dHeight = 0;
double dWidth = 0;

if (!string.IsNullOrEmpty(Text))
{
Illustrator.TextFrame curTextFrame = curDok.TextFrames.Add();
curTextFrame.Contents = Text;
curTextFrame.Top = 0;
//curTextFrame.BlendingMode = Illustrator.AiBlendModes.aiDarken;
if (hScale > 0)
{
curTextFrame.Width = 100;
curTextFrame.Height = 300;
}
curStyle.ApplyTo(curTextFrame.TextRange, false);

dHeight = curTextFrame.Height / 2;
dWidth = curTextFrame.Width / 2;
}


but text is not on fully my rectangle
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> Illustrator Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap