def __init__(self,
                 canvas=None,
                 image=None,
                 input_colourspace='Rec. 709',
                 correlate_colourspace='ACEScg',
                 diagram='CIE 1931',
                 **kwargs):
        self.__initialised = False

        ViewBox.__init__(self, **kwargs)

        self.__canvas = canvas

        self.__image = None
        self.image = image
        self.__input_colourspace = None
        self.input_colourspace = input_colourspace
        self.__correlate_colourspace = None
        self.correlate_colourspace = correlate_colourspace
        self.__diagram = None
        self.diagram = diagram

        self.__diagrams_cycle = Cycle(CHROMATICITY_DIAGRAMS)

        self.__title_overlay_visual = None

        self.__chromaticity_diagram_visual = None
        self.__spectral_locus_visual = None
        self.__RGB_scatter_visual = None
        self.__input_colourspace_visual = None
        self.__correlate_colourspace_visual = None
        self.__pointer_gamut_visual = None
        self.__pointer_gamut_boundaries_visual = None
        self.__grid_visual = None
        self.__axis_visual = None

        self.__visuals = ('chromaticity_diagram_visual',
                          'spectral_locus_visual',
                          'RGB_scatter_visual',
                          'input_colourspace_visual',
                          'correlate_colourspace_visual',
                          'pointer_gamut_visual',
                          'pointer_gamut_boundaries_visual',
                          'grid_visual',
                          'axis_visual')

        self.__visuals_visibility = None

        self.__create_visuals()
        self.__attach_visuals()
        self.__create_camera()

        self.__create_title_overlay_visual()
        self.__canvas.events.resize.connect(self.__canvas_resize_event)

        self.__initialised = True
    def __init__(self,
                 canvas=None,
                 image=None,
                 input_colourspace='Rec. 709',
                 correlate_colourspace='ACEScg',
                 **kwargs):
        self.__initialised = False

        ViewBox.__init__(self, **kwargs)

        self.__canvas = canvas

        self.__image = None
        self.image = image
        self.__input_colourspace = None
        self.input_colourspace = input_colourspace
        self.__correlate_colourspace = None
        self.correlate_colourspace = correlate_colourspace

        self.__title_overlay_visual = None

        self.__image_visual = None

        self.__image_overlay = True

        self.__display_input_colourspace_out_of_gamut = False
        self.__display_correlate_colourspace_out_of_gamut = False
        self.__display_out_of_pointer_gamut = False
        self.__display_hdr_colours = False

        self.__create_visuals()
        self.__attach_visuals()
        self.__create_camera()

        self.__create_title_overlay_visual()
        self.__canvas.events.resize.connect(self.__canvas_resize_event)

        self.__initialised = True
    def __init__(self,
                 canvas=None,
                 image=None,
                 input_colourspace='Rec. 709',
                 reference_colourspace='CIE xyY',
                 correlate_colourspace='ACEScg',
                 settings=None,
                 **kwargs):
        self.__initialised = False

        ViewBox.__init__(self, **kwargs)

        self.__canvas = canvas

        self.__image = None
        self.image = image
        self.__input_colourspace = None
        self.input_colourspace = input_colourspace
        self.__reference_colourspace = None
        self.reference_colourspace = reference_colourspace
        self.__correlate_colourspace = None
        self.correlate_colourspace = correlate_colourspace

        self.__settings = None
        self.settings = settings

        self.__camera_presets = {}
        self.__visuals_style_presets = OrderedDict()
        self.__axis_presets = {}

        self.__title_overlay_visual = None

        self.__colourspace_visual_resolution = 16
        self.__colourspace_visual_resolution_limits = (1, 64)

        self.__input_colourspace_visual = None
        self.__correlate_colourspace_visual = None
        self.__RGB_scatter_visual = None
        self.__pointer_gamut_visual = None
        self.__pointer_gamut_hull_visual = None
        self.__spectral_locus_visual = None
        self.__axis_visual = None

        self.__visuals = ('RGB_scatter_visual',
                          'input_colourspace_visual',
                          'correlate_colourspace_visual',
                          'pointer_gamut_visual',
                          'pointer_gamut_hull_visual',
                          'spectral_locus_visual',
                          'axis_visual')

        self.__visuals_visibility = None

        self.__create_presets()

        self.__create_visuals()
        self.__attach_visuals()
        self.__create_camera()

        self.__create_title_overlay_visual()
        self.__canvas.events.resize.connect(self.__canvas_resize_event)

        self.__initialised = True