9 #ifndef CMZN_SPECTRUM_HPP__
10 #define CMZN_SPECTRUM_HPP__
12 #include "zinc/spectrum.h"
13 #include "zinc/context.hpp"
31 cmzn_spectrumcomponent_id id;
42 cmzn_spectrumcomponent_id in_spectrumcomponent_id) :
43 id(in_spectrumcomponent_id)
48 id(cmzn_spectrumcomponent_access(spectrumComponent.id))
54 cmzn_spectrumcomponent_id temp_id = cmzn_spectrumcomponent_access(
55 spectrumComponent.id);
58 cmzn_spectrumcomponent_destroy(&
id);
68 cmzn_spectrumcomponent_destroy(&
id);
166 cmzn_spectrumcomponent_id
getId()
const
180 return cmzn_spectrumcomponent_get_range_minimum(
id);
194 return cmzn_spectrumcomponent_set_range_minimum(
id, value);
206 return cmzn_spectrumcomponent_get_range_maximum(
id);
220 return cmzn_spectrumcomponent_set_range_maximum(
id, value);
232 return cmzn_spectrumcomponent_get_colour_minimum(
id);
246 return cmzn_spectrumcomponent_set_colour_minimum(
id,value);
258 return cmzn_spectrumcomponent_get_colour_maximum(
id);
272 return cmzn_spectrumcomponent_set_colour_maximum(
id, value);
285 return cmzn_spectrumcomponent_get_step_value(
id);
299 return cmzn_spectrumcomponent_set_step_value(
id, value);
311 return cmzn_spectrumcomponent_get_exaggeration(
id);
324 return cmzn_spectrumcomponent_set_exaggeration(
id, value);
337 return cmzn_spectrumcomponent_get_banded_ratio(
id);
351 return cmzn_spectrumcomponent_set_banded_ratio(
id, value);
363 return cmzn_spectrumcomponent_is_active(
id);
376 return cmzn_spectrumcomponent_set_active(
id, active);
388 return cmzn_spectrumcomponent_is_colour_reverse(
id);
401 return cmzn_spectrumcomponent_set_colour_reverse(
id, reverse);
414 return cmzn_spectrumcomponent_is_extend_above(
id);
428 return cmzn_spectrumcomponent_set_extend_above(
id, extend_above);
441 return cmzn_spectrumcomponent_is_extend_below(
id);
455 return cmzn_spectrumcomponent_set_extend_below(
id, extend_below);
469 return cmzn_spectrumcomponent_get_field_component(
id);
484 return cmzn_spectrumcomponent_set_field_component(
id,
498 return cmzn_spectrumcomponent_get_number_of_bands(
id);
512 return cmzn_spectrumcomponent_set_number_of_bands(
id, numberOfBands);
525 return static_cast<ScaleType>(cmzn_spectrumcomponent_get_scale_type(
539 return cmzn_spectrumcomponent_set_scale_type(
id,
540 static_cast<cmzn_spectrumcomponent_scale_type>(scaleType));
553 return static_cast<ColourMappingType>(cmzn_spectrumcomponent_get_colour_mapping_type(
567 return cmzn_spectrumcomponent_set_colour_mapping_type(
id,
568 static_cast<cmzn_spectrumcomponent_colour_mapping_type>(colourMapping));
594 explicit Spectrum(cmzn_spectrum_id in_spectrum_id) :
600 id(cmzn_spectrum_access(spectrum.id))
606 cmzn_spectrum_id temp_id = cmzn_spectrum_access(spectrum.id);
609 cmzn_spectrum_destroy(&
id);
619 cmzn_spectrum_destroy(&
id);
651 return cmzn_spectrum_is_managed(
id);
665 return cmzn_spectrum_set_managed(
id, value);
679 return cmzn_spectrum_begin_change(
id);
692 return cmzn_spectrum_end_change(
id);
703 return cmzn_spectrum_get_name(
id);
715 return cmzn_spectrum_set_name(
id, name);
725 return cmzn_spectrum_get_number_of_spectrumcomponents(
id);
757 cmzn_spectrum_get_next_spectrumcomponent(
id, refComponent.
getId()));
769 cmzn_spectrum_get_previous_spectrumcomponent(
id, refComponent.
getId()));
784 return cmzn_spectrum_move_spectrumcomponent_before(
id, component.
getId(),
785 refComponent.
getId());
800 return cmzn_spectrum_remove_spectrumcomponent(
id, component.
getId());
812 return cmzn_spectrum_remove_all_spectrumcomponents(
id);
826 return cmzn_spectrum_is_material_overwrite(
id);
837 return cmzn_spectrum_set_material_overwrite(
id, overwrite);
850 cmzn_spectrummodule_id id;
860 explicit Spectrummodule(cmzn_spectrummodule_id in_spectrummodule_id) :
861 id(in_spectrummodule_id)
866 id(cmzn_spectrummodule_access(spectrummodule.id))
872 cmzn_spectrummodule_id temp_id = cmzn_spectrummodule_access(
876 cmzn_spectrummodule_destroy(&
id);
886 cmzn_spectrummodule_destroy(&
id);
905 cmzn_spectrummodule_id
getId()
const
918 return Spectrum(cmzn_spectrummodule_create_spectrum(
id));
929 return Spectrum(cmzn_spectrummodule_find_spectrum_by_name(
id, name));
943 return cmzn_spectrummodule_begin_change(
id);
957 return cmzn_spectrummodule_end_change(
id);
971 return Spectrum(cmzn_spectrummodule_get_default_spectrum(
id));
982 return cmzn_spectrummodule_set_default_spectrum(
id, spectrum.
getId());
Maps a single component of a data field to colour in a spectrum.
Definition: spectrum.hpp:28
int setFieldComponent(int componentNumber)
Definition: spectrum.hpp:482
bool isExtendBelow()
Definition: spectrum.hpp:439
Spectrumcomponent getNextSpectrumcomponent(const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:754
int setColourReverse(bool reverse)
Definition: spectrum.hpp:399
int setRangeMinimum(double value)
Definition: spectrum.hpp:192
Spectrum findSpectrumByName(const char *name)
Definition: spectrum.hpp:927
int setColourMinimum(double value)
Definition: spectrum.hpp:244
double getRangeMinimum()
Definition: spectrum.hpp:178
int getNumberOfBands()
Definition: spectrum.hpp:496
Definition: spectrum.hpp:133
Definition: spectrum.hpp:89
ColourMappingType
Definition: spectrum.hpp:107
int getNumberOfSpectrumcomponents()
Definition: spectrum.hpp:723
int setScaleType(ScaleType scaleType)
Definition: spectrum.hpp:537
Spectrumcomponent createSpectrumcomponent()
Definition: spectrum.hpp:733
int beginChange()
Definition: spectrum.hpp:941
Spectrumcomponent getFirstSpectrumcomponent()
Definition: spectrum.hpp:743
ScaleType
Definition: spectrum.hpp:85
Spectrumcomponent getPreviousSpectrumcomponent(const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:766
int endChange()
Definition: spectrum.hpp:955
double getColourMinimum()
Definition: spectrum.hpp:230
Definition: spectrum.hpp:111
Definition: spectrum.hpp:136
Definition: spectrum.hpp:130
int setExtendAbove(bool extend_above)
Definition: spectrum.hpp:426
Definition: spectrum.hpp:142
int setColourMaximum(double value)
Definition: spectrum.hpp:270
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:638
Spectrum getDefaultSpectrum()
Definition: spectrum.hpp:969
int setExtendBelow(bool extend_below)
Definition: spectrum.hpp:453
int removeAllSpectrumcomponents()
Definition: spectrum.hpp:810
Spectrum createSpectrum()
Definition: spectrum.hpp:916
int beginChange()
Definition: spectrum.hpp:677
bool isMaterialOverwrite()
Definition: spectrum.hpp:824
ColourMappingType getColourMappingType()
Definition: spectrum.hpp:551
double getRangeMaximum()
Definition: spectrum.hpp:204
int setMaterialOverwrite(bool overwrite)
Definition: spectrum.hpp:835
cmzn_spectrumcomponent_id getId() const
Definition: spectrum.hpp:166
double getColourMaximum()
Definition: spectrum.hpp:256
Definition: spectrum.hpp:145
int setExaggeration(double value)
Definition: spectrum.hpp:322
int setNumberOfBands(int numberOfBands)
Definition: spectrum.hpp:510
int setManaged(bool value)
Definition: spectrum.hpp:663
Definition: spectrum.hpp:150
int endChange()
Definition: spectrum.hpp:690
Module managing all spectrums.
Definition: spectrum.hpp:847
int setActive(bool active)
Definition: spectrum.hpp:374
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:581
char * getName()
Definition: spectrum.hpp:701
Definition: spectrum.hpp:118
int getFieldComponent()
Definition: spectrum.hpp:467
ScaleType getScaleType()
Definition: spectrum.hpp:523
bool isValid() const
Definition: spectrum.hpp:895
int setName(const char *name)
Definition: spectrum.hpp:713
int removeSpectrumcomponent(const Spectrumcomponent &component)
Definition: spectrum.hpp:798
bool isExtendAbove()
Definition: spectrum.hpp:412
Definition: spectrum.hpp:127
double getStepValue()
Definition: spectrum.hpp:283
int moveSpectrumcomponentBefore(const Spectrumcomponent &component, const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:781
Definition: spectrum.hpp:153
int setColourMappingType(ColourMappingType colourMapping)
Definition: spectrum.hpp:565
int setStepValue(double value)
Definition: spectrum.hpp:297
bool isValid() const
Definition: spectrum.hpp:77
bool isValid() const
Definition: spectrum.hpp:628
bool isColourReverse()
Definition: spectrum.hpp:386
Definition: spectrum.hpp:156
double getExaggeration()
Definition: spectrum.hpp:309
Definition: spectrum.hpp:87
Definition: spectrum.hpp:95
Spectrummodule getSpectrummodule()
Definition: spectrum.hpp:986
int setDefaultSpectrum(const Spectrum &spectrum)
Definition: spectrum.hpp:980
double getBandedRatio()
Definition: spectrum.hpp:335
int setBandedRatio(double value)
Definition: spectrum.hpp:349
cmzn_spectrummodule_id getId() const
Definition: spectrum.hpp:905
int setRangeMaximum(double value)
Definition: spectrum.hpp:218
bool isManaged()
Definition: spectrum.hpp:649
bool isActive()
Definition: spectrum.hpp:361
Definition: spectrum.hpp:109