summaryrefslogtreecommitdiff
path: root/kicad/lib-render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-26 01:15:57 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-26 01:40:30 -0300
commitdfd916f49f4552be1d1dc44c6e0dc925a50c4c3f (patch)
tree6de8be6c10ae905eb9b8d8279a321f1632370adb /kicad/lib-render.c
parentae518b0432c49abb21229f632020f54a2b159903 (diff)
downloadeeshow-dfd916f49f4552be1d1dc44c6e0dc925a50c4c3f.tar.gz
eeshow-dfd916f49f4552be1d1dc44c6e0dc925a50c4c3f.tar.bz2
eeshow-dfd916f49f4552be1d1dc44c6e0dc925a50c4c3f.zip
kicad/: always initialize struct text.style
Diffstat (limited to 'kicad/lib-render.c')
-rw-r--r--kicad/lib-render.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/kicad/lib-render.c b/kicad/lib-render.c
index a2d4748..8c9e328 100644
--- a/kicad/lib-render.c
+++ b/kicad/lib-render.c
@@ -223,13 +223,14 @@ static void draw_pin_name(const struct comp *comp, const struct lib_pin *pin,
}
struct text txt = {
- .s = pin->name,
- .x = mx(pin->x + ox, pin->y + oy, m) + sx,
- .y = my(pin->x + ox, pin->y + oy, m) + sy,
- .size = pin->name_size,
- .rot = rot,
- .hor = comp->name_offset ? hor : text_mid,
- .vert = comp->name_offset ? text_mid : text_min,
+ .s = pin->name,
+ .x = mx(pin->x + ox, pin->y + oy, m) + sx,
+ .y = my(pin->x + ox, pin->y + oy, m) + sy,
+ .size = pin->name_size,
+ .rot = rot,
+ .hor = comp->name_offset ? hor : text_mid,
+ .vert = comp->name_offset ? text_mid : text_min,
+ .style = text_normal,
};
text_rot(&txt, matrix_to_angle(m));
@@ -275,13 +276,14 @@ static void draw_pin_num(const struct comp *comp, const struct lib_pin *pin,
}
struct text txt = {
- .s = pin->number,
- .x = mx(pin->x + ox, pin->y + oy, m) + sx,
- .y = my(pin->x + ox, pin->y + oy, m) + sy,
- .size = pin->number_size,
- .rot = rot,
- .hor = text_mid,
- .vert = comp->name_offset ? text_min : text_max,
+ .s = pin->number,
+ .x = mx(pin->x + ox, pin->y + oy, m) + sx,
+ .y = my(pin->x + ox, pin->y + oy, m) + sy,
+ .size = pin->number_size,
+ .rot = rot,
+ .hor = text_mid,
+ .vert = comp->name_offset ? text_min : text_max,
+ .style = text_normal,
};
text_rot(&txt, matrix_to_angle(m) % 180);
@@ -665,11 +667,12 @@ static void draw_text(const struct lib_text *text, struct gfx *gfx,
const int m[6])
{
struct text txt = {
- .s = text->s,
- .size = text->dim,
- .x = mx(text->x, text->y, m),
- .y = my(text->x, text->y, m),
- .rot = angle_add(text->orient / 10, matrix_to_angle(m)),
+ .s = text->s,
+ .size = text->dim,
+ .x = mx(text->x, text->y, m),
+ .y = my(text->x, text->y, m),
+ .rot = angle_add(text->orient / 10, matrix_to_angle(m)),
+ .style = text->style,
};
decode_alignment(&txt, text->hor_align, text->vert_align);