Author Topic: shape script: move text in shape  (Read 2871 times)

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
shape script: move text in shape
« on: April 28, 2014, 11:09:42 pm »
Hi,

When I print text in my shape at the bottom, the text is shown outside my shape. So I want to move the text up for a certain amount of pixels (or percentages). I experimented with the bottomAncorOffset, but it doesn't seem to work... (see code below).

Am I doing something wrong or is there another way to move text in a shape?

Code: [Select]
setfillcolor(255,104,32);
setpen(255,255,255,2);
defSize(350,180);
      
startpath();
moveto(100,50);
bezierto(100,86.2,87.6,100,55,100);
bezierto(23.8,100,10,87.6,10,50);
lineto(0,50);
lineto(17,0);
lineto(35,50);
lineto(25,50);
Arcto(25, 25, 85, 85, 25, 50, 85, 50);
lineto(100,50);
            
endpath();
            
fillandstrokepath();

addsubshape("nameBottom","S");

shape nameBottom
{
      bottomAnchorOffset = (0,-30);
      h_align = "center";
            
      Printwrapped("Bottom: #NAME#");
}


Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: shape script: move text in shape
« Reply #1 on: April 29, 2014, 05:01:42 am »
Add
Code: [Select]
layouttype="border";at the beginning. (See page 19 of my Shape Script book)

q.