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

        self._shuffle_buffer = np.empty((size[1]+1, size[0]+1, 4,),
                                        dtype=np.uint8)

        return gc
Beispiel #2
0
 def _create_gc(self, size, pix_format="rgba32"):
     gc = GraphicsContext(
         (size[0] + 1, size[1] + 1),
         pix_format=pix_format,
         base_pixel_scale=self.base_pixel_scale,
     )
     gc.translate_ctm(0.5, 0.5)
     return gc
Beispiel #3
0
    def _create_gc(self, size, pix_format="rgba32"):
        gc = GraphicsContext((size[0] + 1, size[1] + 1), pix_format=pix_format)
        gc.translate_ctm(0.5, 0.5)

        self._shuffle_buffer = np.empty((
            size[1] + 1,
            size[0] + 1,
            4,
        ),
                                        dtype=np.uint8)

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

        self._shuffle_buffer = np.empty(
            (size[1] + 1, size[0] + 1, 4), dtype=np.uint8
        )

        return gc