diff --git a/objects/SADT/box.c b/objects/SADT/box.c index 3cecb92..07979fe 100644 --- a/objects/SADT/box.c +++ b/objects/SADT/box.c @@ -66,6 +66,8 @@ typedef struct _Box { Text *text; gchar *id; real padding; + LineStyle line_style; + real dashlength; TextAttributes attrs; @@ -143,6 +145,7 @@ static PropDescription box_props[] = { PROP_STD_TEXT_FONT, PROP_STD_TEXT_HEIGHT, PROP_STD_TEXT_COLOUR, + PROP_STD_LINE_STYLE_OPTIONAL, PROP_STD_LINE_COLOUR_OPTIONAL, PROP_STD_FILL_COLOUR_OPTIONAL, { "id", PROP_TYPE_STRING, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE, @@ -172,6 +175,8 @@ static PropOffset box_offsets[] = { { "text_font",PROP_TYPE_FONT,offsetof(Box,attrs.font)}, { PROP_STDNAME_TEXT_HEIGHT,PROP_STDTYPE_TEXT_HEIGHT,offsetof(Box,attrs.height)}, { "text_colour",PROP_TYPE_COLOUR,offsetof(Box,attrs.color)}, + { "line_style", PROP_TYPE_LINESTYLE, + offsetof(Box, line_style), offsetof(Box, dashlength) }, { "line_colour", PROP_TYPE_COLOUR, offsetof(Box, line_color) }, { "fill_colour", PROP_TYPE_COLOUR, offsetof(Box, fill_color) }, { "id", PROP_TYPE_STRING, offsetof(Box,id)}, @@ -293,7 +298,9 @@ sadtbox_draw(Box *box, DiaRenderer *renderer) renderer_ops->set_linewidth(renderer, SADTBOX_LINE_WIDTH); - renderer_ops->set_linestyle(renderer, LINESTYLE_SOLID); + renderer_ops->set_linestyle(renderer, box->line_style); + renderer_ops->set_dashlength(renderer, box->dashlength); + renderer_ops->set_linejoin(renderer, LINEJOIN_MITER); renderer_ops->draw_rect(renderer, @@ -501,6 +508,7 @@ sadtbox_create(Point *startpoint, elem->height = DEFAULT_HEIGHT; box->padding = 0.5; /* default_values.padding; */ + attributes_get_default_line_style(&box->line_style,&box->dashlength); box->line_color = color_black; box->fill_color = color_white;