• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revision3f1eb324ef01fb0e27eda5883090bd8355b73382 (tree)
Time2007-03-29 04:49:06
AuthorLars Clausen <lclausen@src....>
CommiterLars Clausen

Log Message

Branch for fixes after 0.96

svn path=/branches/dia_0_96/; revision=3656

Change Summary

Incremental Difference

--- a/objects/custom/custom_object.c
+++ b/objects/custom/custom_object.c
@@ -977,14 +977,13 @@ custom_update_data(Custom *custom, AnchorShape horiz, AnchorShape vert)
977977 txs = text_get_string_copy(custom->text);
978978
979979 if ((tb.bottom+tb.top)/2 > elem->corner.y + elem->height)
980- p.y = tb.top +
981- dia_font_ascent(txs,custom->text->font, custom->text->height);
980+ p.y = tb.top + text_get_ascent(custom->text);
982981 else if ((tb.bottom+tb.top)/2 < elem->corner.y)
983982 p.y = tb.bottom + custom->text->height * (custom->text->numlines - 1);
984983 else
985984 p.y = (tb.top + tb.bottom -
986985 custom->text->height * custom->text->numlines) / 2 +
987- dia_font_ascent(txs,custom->text->font, custom->text->height);
986+ text_get_ascent(custom->text);
988987 text_set_position(custom->text, &p);
989988 g_free(txs);
990989 }
@@ -1190,16 +1189,13 @@ void custom_reposition_text(Custom *custom, GraphicElementText *text) {
11901189 /* align the text to be close to the shape ... */
11911190
11921191 if ((tb.bottom+tb.top)/2 > elem->corner.y + elem->height)
1193- p.y = tb.top +
1194- dia_font_ascent(text->string,
1195- text->object->font, text->object->height);
1192+ p.y = tb.top + text_get_ascent(text->object);
11961193 else if ((tb.bottom+tb.top)/2 < elem->corner.y)
11971194 p.y = tb.bottom + text->object->height * (text->object->numlines - 1);
11981195 else
11991196 p.y = (tb.top + tb.bottom -
12001197 text->object->height * text->object->numlines) / 2 +
1201- dia_font_ascent(text->string,
1202- text->object->font, text->object->height);
1198+ text_get_ascent(text->object);
12031199 text_set_position(text->object, &p);
12041200 return;
12051201 }