Lines Matching +full:- +full:cairo
23 import cairo
125 self.panel_width = self.width / 2 - self.pad * 3
127 self.height / 2 - self.pad * 6 - self.font_size * 2 - self.title_font_size
143 width = self.width - 3 * self.pad
144 height = self.height - 2 * self.pad
210 cr = cairo.Context(self.surface)
213 y = self.height - self.pad - self.font_size * 2
214 width = self.width - 2 * self.pad
223 y -= self.pad + self.font_size
226 cr.rectangle(xx - self.pad * 0.7, y, 1.5 * self.pad, self.font_size)
235 y -= self.pad + self.font_size
240 cr.rectangle(xx - self.pad * 0.7, y, 1.5 * self.pad, self.font_size)
250 y -= self.pad + self.font_size
261 y -= self.pad + self.font_size
271 y -= self.pad + self.font_size
281 y -= self.pad + self.font_size
291 x=xx - self.start_arrow_length * 0.3,
295 y -= self.pad + self.font_size
310 y -= self.pad + self.font_size
315 x=xx - self.start_arrow_length * 0.3,
319 y -= self.pad + self.font_size
322 y -= self.pad + self.font_size
326 "Kink-reporting aggressiveness: %g" % kinkiness,
331 y -= self.pad + self.font_size
340 y -= self.pad + self.font_size
343 y -= self.pad + self.font_size
347 width = self.width - 3 * self.pad
348 height = self.height - 2 * self.pad
386 self.draw_label(glyphname, x=x + 2 * pad, y=y, width=width - 2 * pad)
393 width = self.width - 2 * self.pad
394 height = self.height - 2 * self.pad
410 self.draw_label(glyphname, x=x + 5 * pad, y=y, width=width - 2 * pad)
502 width=self.width - 2 * self.pad,
511 width=self.width - 2 * self.pad,
560 # Draw the mid-way of the two masters
656 proposed_start = len(points2.value) - 2 - proposed_start
660 endPath = points2.value[-1:]
661 pts = points2.value[1:-1]
701 j_prev = (i - 1) % (len(points1.value) - 2) + 1
704 j_next = (i + 1) % (len(points1.value) - 2) + 1
716 r0 = abs(pt0 - pt0_prev) / abs(pt0_next - pt0_prev)
717 r1 = abs(pt1 - pt1_prev) / abs(pt1_next - pt1_prev)
720 pt0 = pt0_prev + r_mid * (pt0_next - pt0_prev)
721 pt1 = pt1_prev + r_mid * (pt1_next - pt1_prev)
788 y=self.height - self.font_size - self.pad,
813 cr = cairo.Context(self.surface)
815 "@cairo:",
816 cairo.FONT_SLANT_NORMAL,
817 cairo.FONT_WEIGHT_BOLD if bold else cairo.FONT_WEIGHT_NORMAL,
836 label_x = x + (width - extents.width) * align
863 glyph_width = bounds[2] - bounds[0]
864 glyph_height = bounds[3] - bounds[1]
879 cr = cairo.Context(self.surface)
883 (self.panel_width - glyph_width * scale) / 2,
884 (self.panel_height - glyph_height * scale) / 2,
886 cr.scale(scale, -scale)
887 cr.translate(-bounds[0], -bounds[3])
934 cr.set_line_cap(cairo.LINE_CAP_ROUND)
940 x, y = args[-1]
951 for x, y in args[:-1]:
968 cr.move_to(*args[-1])
975 cr.move_to(*args[-1])
1029 # Draw start-point arrow
1052 length = abs(second_pt - first_pt)
1058 second_pt.imag - first_pt.imag,
1059 second_pt.real - first_pt.real,
1118 cr.set_line_cap(cairo.LINE_CAP_ROUND)
1132 cr.set_line_cap(cairo.LINE_CAP_SQUARE)
1148 -self.start_arrow_length,
1149 -self.start_arrow_length * 0.4,
1152 -self.start_arrow_length,
1166 cr = cairo.Context(self.surface)
1170 "@cairo:monospace", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL
1187 (width - text_width * scale) / 2, (height - text_height * scale) / 2
1203 width=self.width - 2 * self.pad,
1213 width=self.width - 2 * self.pad,
1214 height=self.height - 2 * self.pad - self.font_size,
1240 self.surface = cairo.PSSurface(self.out, self.width, self.height)
1246 self.surface = cairo.PDFSurface(self.out, self.width, self.height)
1248 cairo.PDF_METADATA_CREATOR, "fonttools varLib.interpolatable"
1250 self.surface.set_metadata(cairo.PDF_METADATA_CREATE_DATE, "")
1257 self.surface = cairo.SVGSurface(self.sink, self.width, self.height)
1269 self.surface = cairo.SVGSurface(self.sink, self.width, self.height)