12 const float bottom = size.fHeight *
scale;
13 const float scaled_endcap_radius = (endcap_width / 2) *
scale;
16 path.moveTo(0, bottom - 1);
20 bottom - 1 - scaled_endcap_radius);
24 path.lineTo(scaled_endcap_radius - 1, scaled_endcap_radius + 1);
45 path.lineTo(
right - scaled_endcap_radius * 2, -1);
51 scaled_endcap_radius + 1);
57 path.lineTo(
right - scaled_endcap_radius + 1, bottom - 1 - scaled_endcap_radius);
72 float scale,
const SkISize& size,
float endcap_width,
float horizontal_inset = 0) {
76 const float bottom = std::ceil(size.fHeight *
scale);
80 const float scaled_endcap_radius = (endcap_width / 2) *
scale;
93 bottom - scaled_endcap_radius);
97 right_path.
lineTo(
right - scaled_endcap_radius, scaled_endcap_radius);
108 right_path.
lineTo(0, bottom);
113 left_path.
moveTo(scaled_endcap_radius * 2, 0);
121 left_path.
lineTo(scaled_endcap_radius, bottom - scaled_endcap_radius);
136 return complete_path;
142 p.setAntiAlias(
true);