Example #1
0
    def _create_gc(self, size, pix_format="bgra32"):
        gc = GraphicsContext(
            (size[0] + 1, size[1] + 1),
            base_pixel_scale=self.base_pixel_scale,
        )
        gc.translate_ctm(0.5, 0.5)

        return gc
Example #2
0
 def _create_gc(self, size, pix_format="bgra32"):
     "Create a Kiva graphics context of a specified size"
     gc = GraphicsContext(
         (size[0] + 1, size[1] + 1),
         base_pixel_scale=self.base_pixel_scale,
     )
     gc.translate_ctm(0.5, 0.5)
     return gc
Example #3
0
 def _create_gc(self, size, pix_format="bgra32"):
     "Create a Kiva graphics context of a specified size"
     gc = GraphicsContext((size[0]+1, size[1]+1))
     gc.translate_ctm(0.5, 0.5)
     return gc
    def _create_gc(self, size, pix_format="bgra32"):
        gc = GraphicsContext((size[0] + 1, size[1] + 1))
        gc.translate_ctm(0.5, 0.5)

        return gc
Example #5
0
    def create_graphics_context(self, width=600, height=600, pixel_scale=2.0):
        from kiva.cairo import GraphicsContext

        return GraphicsContext((width, height), base_pixel_scale=pixel_scale)
Example #6
0
 def create_graphics_context(self, width, height):
     from kiva.cairo import GraphicsContext
     return GraphicsContext((width, height))
Example #7
0
    def _create_gc(self, size, pix_format="bgra32"):
        gc = GraphicsContext((size[0]+1, size[1]+1))
        gc.translate_ctm(0.5, 0.5)

        return gc