- if (_outline_what & LEFT) {
- context->move_to (self.x0, self.y0);
- context->line_to (self.x0, self.y1);
- }
-
- if (_outline_what & BOTTOM) {
- context->move_to (self.x0, self.y1);
- context->line_to (self.x1, self.y1);
- }
-
- if (_outline_what & RIGHT) {
- context->move_to (self.x1, self.y0);
- context->line_to (self.x1, self.y1);
- }
-
- if (_outline_what & TOP) {
- context->move_to (self.x0, self.y0);
- context->line_to (self.x1, self.y0);
+ } else {
+
+ if (_outline_what & LEFT) {
+ /* vertical line: move x-coordinate by 0.5 pixels */
+ context->move_to (self.x0 + 0.5, self.y0);
+ context->line_to (self.x0 + 0.5, self.y1);
+ }
+
+ if (_outline_what & TOP) {
+ /* horizontal line: move y-coordinate by 0.5 pixels */
+ context->move_to (self.x0, self.y0 + 0.5);
+ context->line_to (self.x1, self.y0 + 0.5);
+ }
+
+ if (_outline_what & BOTTOM) {
+ /* horizontal line: move y-coordinate by 0.5 pixels */
+ context->move_to (self.x0, self.y1 - 0.5);
+ context->line_to (self.x1, self.y1 - 0.5);
+ }
+
+ if (_outline_what & RIGHT) {
+ /* vertical line: move x-coordinate by 0.5 pixels */
+ context->move_to (self.x1 + 0.5, self.y0);
+ context->line_to (self.x1 + 0.5, self.y1);
+ }
+