|
|
@@ -330,6 +330,8 @@ static void key_copier_view_measure_draw_callback(Canvas* canvas, void* model) {
|
|
|
int pre_extra_x_px = 0;
|
|
|
int bottom_post_extra_x_px = 0; // new
|
|
|
int bottom_pre_extra_x_px = 0; // new
|
|
|
+ int level_contour_px =
|
|
|
+ (int)round((my_format.last_pin_inch + my_format.elbow_inch) / inches_per_px);
|
|
|
for(int current_pin = 1; current_pin <= my_model->format.pin_num; current_pin += 1) {
|
|
|
double current_center_px =
|
|
|
my_format.first_pin_inch + (current_pin - 1) * my_format.pin_increment_inch;
|
|
|
@@ -461,6 +463,16 @@ static void key_copier_view_measure_draw_callback(Canvas* canvas, void* model) {
|
|
|
top_contour_px); // draw top shoulder
|
|
|
last_depth = 0;
|
|
|
pre_extra_x_px = max(current_depth_px + pin_half_width_px, 0);
|
|
|
+ if(my_format.sides == 2) {
|
|
|
+ canvas_draw_line(
|
|
|
+ canvas,
|
|
|
+ 0,
|
|
|
+ bottom_contour_px,
|
|
|
+ pin_center_px - pin_half_width_px - current_depth_px,
|
|
|
+ bottom_contour_px); // draw bottom shoulder (hidden by level contour)
|
|
|
+ } else {
|
|
|
+ canvas_draw_line(canvas, 0, 62, level_contour_px, 62);
|
|
|
+ }
|
|
|
}
|
|
|
if(current_pin == my_model->format.pin_num) {
|
|
|
next_depth = 0;
|
|
|
@@ -525,12 +537,9 @@ static void key_copier_view_measure_draw_callback(Canvas* canvas, void* model) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- int level_contour_px =
|
|
|
- (int)round((my_format.last_pin_inch + my_format.elbow_inch) / inches_per_px);
|
|
|
int elbow_px = (int)round(my_format.elbow_inch / inches_per_px);
|
|
|
- canvas_draw_line(canvas, 0, 62, level_contour_px, 62);
|
|
|
canvas_draw_line(canvas, level_contour_px, 62, level_contour_px + elbow_px, 62 - elbow_px);
|
|
|
-
|
|
|
+ canvas_draw_line(canvas, 0, top_contour_px - 6, 0, top_contour_px);
|
|
|
if(my_format.stop == 2) {
|
|
|
// Draw a line using level_contour_px if stop equals 2 elbow must be firt pin inch
|
|
|
canvas_draw_line(canvas, level_contour_px, top_contour_px, level_contour_px, 63);
|