Page 1 of 1

Drawing with MSL does not work

Posted: 2008-03-06T10:47:42-07:00
by hotspur
Hi,
a while ago I asked how to draw with MSL but no one seemed to know the answer. Today, I looked into the sources and found that although drawing method is called in msl.c (around line 2550), no primitive is defined (and thus nothing is drawn).
However, adding new attribute (primitive) does the trick (added under parsing poinsize atribute):

Code: Select all

if (LocaleCompare(keyword,"primitive") == 0)
{  
  CloneString(&draw_info->primitive,value);
  break;
}
because now drawing via

Code: Select all

<draw pointsize="40" fill="blue" primitive="text 30,30 Hullo" />
<draw pointsize="40" fill="blue" primitive="line 30,30,20,20" />
works. Or was my idea worthless because this is already possible?
Bye
- Vojta