9 #ifndef CMZN_GLYPH_HPP__
10 #define CMZN_GLYPH_HPP__
12 #include "zinc/glyph.h"
13 #include "zinc/context.hpp"
14 #include "zinc/material.hpp"
15 #include "zinc/spectrum.hpp"
46 explicit Glyph(cmzn_glyph_id in_glyph_id) :
51 id(cmzn_glyph_access(glyph.id))
56 cmzn_glyph_id temp_id = cmzn_glyph_access(glyph.id);
59 cmzn_glyph_destroy(&
id);
69 cmzn_glyph_destroy(&
id);
194 return cmzn_glyph_get_name(
id);
205 return cmzn_glyph_set_name(
id, name);
216 return (0 != cmzn_glyph_is_managed(
id));
233 return cmzn_glyph_set_managed(
id, static_cast<int>(value));
266 inline cmzn_glyph_axes_id getDerivedId()
268 return reinterpret_cast<cmzn_glyph_axes_id
>(id);
274 explicit GlyphAxes(cmzn_glyph_axes_id axes_id)
275 :
Glyph(reinterpret_cast<cmzn_glyph_id>(axes_id))
285 return cmzn_glyph_axes_get_axis_width(getDerivedId());
298 return cmzn_glyph_axes_set_axis_width(getDerivedId(), axisWidth);
310 return cmzn_glyph_axes_get_axis_label(getDerivedId(), axisNumber);
322 return cmzn_glyph_axes_set_axis_label(getDerivedId(), axisNumber, label);
333 return Material(cmzn_glyph_axes_get_axis_material(getDerivedId(), axisNumber));
347 return cmzn_glyph_axes_set_axis_material(getDerivedId(), axisNumber, material.
getId());
354 return GlyphAxes(cmzn_glyph_cast_axes(
id));
372 inline cmzn_glyph_colour_bar_id getDerivedId()
374 return reinterpret_cast<cmzn_glyph_colour_bar_id
>(id);
381 :
Glyph(reinterpret_cast<cmzn_glyph_id>(colour_bar_id))
391 int getAxis(
int valuesCount,
double *valuesOut)
393 return cmzn_glyph_colour_bar_get_axis(getDerivedId(), valuesCount, valuesOut);
406 int setAxis(
int valuesCount,
const double *valuesIn)
408 return cmzn_glyph_colour_bar_set_axis(getDerivedId(), valuesCount, valuesIn);
420 return cmzn_glyph_colour_bar_get_centre(getDerivedId(), valuesCount, valuesOut);
436 return cmzn_glyph_colour_bar_set_centre(getDerivedId(), valuesCount, valuesIn);
447 return cmzn_glyph_colour_bar_get_extend_length(getDerivedId());
460 return cmzn_glyph_colour_bar_set_extend_length(getDerivedId(), extendLength);
470 return cmzn_glyph_colour_bar_get_label_divisions(getDerivedId());
483 return cmzn_glyph_colour_bar_set_label_divisions(getDerivedId(), labelDivisions);
493 return Material(cmzn_glyph_colour_bar_get_label_material(getDerivedId()));
506 return cmzn_glyph_colour_bar_set_label_material(getDerivedId(), material.
getId());
517 return cmzn_glyph_colour_bar_get_number_format(getDerivedId());
533 return cmzn_glyph_colour_bar_set_number_format(getDerivedId(), numberFormat);
545 return cmzn_glyph_colour_bar_get_side_axis(getDerivedId(), valuesCount, valuesOut);
561 return cmzn_glyph_colour_bar_set_side_axis(getDerivedId(), valuesCount, valuesIn);
571 return cmzn_glyph_colour_bar_get_tick_length(getDerivedId());
584 return cmzn_glyph_colour_bar_set_tick_length(getDerivedId(), tickLength);
605 cmzn_glyphmodule_id id;
613 explicit Glyphmodule(cmzn_glyphmodule_id in_glyphmodule_id) :
614 id(in_glyphmodule_id)
618 id(cmzn_glyphmodule_access(glyphModule.id))
623 cmzn_glyphmodule_id temp_id = cmzn_glyphmodule_access(glyphModule.id);
626 cmzn_glyphmodule_destroy(&
id);
636 cmzn_glyphmodule_destroy(&
id);
671 return cmzn_glyphmodule_begin_change(
id);
685 return cmzn_glyphmodule_end_change(
id);
700 return GlyphAxes(reinterpret_cast<cmzn_glyph_axes_id>(
701 cmzn_glyphmodule_create_glyph_axes(
id, axisGlyph.
getId(), axisWidth)));
715 cmzn_glyphmodule_create_glyph_colour_bar(
id, spectrum.
getId())));
764 return cmzn_glyphmodule_define_standard_glyphs(
id);
775 return Glyph(cmzn_glyphmodule_find_glyph_by_name(
id, name));
780 return Glyph(cmzn_glyphmodule_find_glyph_by_glyph_shape_type(
id, static_cast<cmzn_glyph_shape_type>(glyphShapeType)));
790 return Glyph(cmzn_glyphmodule_get_default_point_glyph(
id));
801 return cmzn_glyphmodule_set_default_point_glyph(
id, glyph.
getId());
808 return Glyphmodule(cmzn_context_get_glyphmodule(
id));
Definition: glyph.hpp:138
Material getAxisMaterial(int axisNumber)
Definition: glyph.hpp:331
char * getAxisLabel(int axisNumber)
Definition: glyph.hpp:308
A specialised glyph type which renders 3-D axes.
Definition: glyph.hpp:258
int endChange()
Definition: glyph.hpp:683
Definition: glyph.hpp:101
bool isManaged()
Definition: glyph.hpp:214
Definition: glyph.hpp:136
Definition: glyph.hpp:144
Definition: glyph.hpp:178
int defineStandardGlyphs()
Definition: glyph.hpp:762
Definition: glyph.hpp:142
GlyphColourBar castColourBar()
Definition: glyph.hpp:589
Definition: glyph.hpp:160
Definition: glyph.hpp:109
Definition: glyph.hpp:140
double getTickLength()
Definition: glyph.hpp:569
cmzn_material_id getId() const
Definition: material.hpp:83
RepeatMode
Definition: glyph.hpp:97
Glyphmodule getGlyphmodule()
Definition: glyph.hpp:806
Definition: glyph.hpp:152
GlyphAxes createGlyphAxes(const Glyph &axisGlyph, double axisWidth)
Definition: glyph.hpp:698
Definition: glyph.hpp:164
Definition: glyph.hpp:162
int getAxis(int valuesCount, double *valuesOut)
Definition: glyph.hpp:391
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:638
Definition: glyph.hpp:170
int setManaged(bool value)
Definition: glyph.hpp:231
Definition: glyph.hpp:154
Definition: glyph.hpp:172
A glyph is a static graphics object used to visualise a point in space.
Definition: glyph.hpp:35
Definition: glyph.hpp:132
Definition: glyph.hpp:158
Glyph findGlyphByName(const char *name)
Definition: glyph.hpp:773
Definition: glyph.hpp:148
int setAxisMaterial(int axisNumber, const Material &material)
Definition: glyph.hpp:345
Zinc materials specify colouring of graphics.
Definition: material.hpp:29
int getSideAxis(int valuesCount, double *valuesOut)
Definition: glyph.hpp:543
Definition: glyph.hpp:174
cmzn_glyphmodule_id getId() const
Definition: glyph.hpp:655
int setAxisWidth(double axisWidth)
Definition: glyph.hpp:296
int setDefaultPointGlyph(const Glyph &glyph)
Definition: glyph.hpp:799
Definition: glyph.hpp:113
int setNumberFormat(const char *numberFormat)
Definition: glyph.hpp:531
int setLabelDivisions(int labelDivisions)
Definition: glyph.hpp:481
bool isValid() const
Definition: glyph.hpp:645
char * getNumberFormat()
Definition: glyph.hpp:515
char * getName()
Definition: glyph.hpp:192
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:581
int beginChange()
Definition: glyph.hpp:669
ShapeType
Definition: glyph.hpp:130
double getExtendLength()
Definition: glyph.hpp:445
Module managing all glyphs.
Definition: glyph.hpp:602
Definition: glyph.hpp:156
A specialised glyph type which draws a cylindrical colour bar.
Definition: glyph.hpp:364
Definition: glyph.hpp:180
double getAxisWidth()
Definition: glyph.hpp:283
int setAxisLabel(int axisNumber, const char *label)
Definition: glyph.hpp:320
Material getLabelMaterial()
Definition: glyph.hpp:491
int getCentre(int valuesCount, double *valuesOut)
Definition: glyph.hpp:418
Definition: glyph.hpp:176
Definition: glyph.hpp:150
int setCentre(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:434
GlyphColourBar createGlyphColourBar(const Spectrum &spectrum)
Definition: glyph.hpp:712
int setSideAxis(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:559
int setExtendLength(double extendLength)
Definition: glyph.hpp:458
GlyphAxes castAxes()
Definition: glyph.hpp:352
int setTickLength(double tickLength)
Definition: glyph.hpp:582
Glyph getDefaultPointGlyph()
Definition: glyph.hpp:788
Definition: glyph.hpp:105
cmzn_glyph_id getId() const
Definition: glyph.hpp:88
int getLabelDivisions()
Definition: glyph.hpp:468
Definition: glyph.hpp:168
int setLabelMaterial(const Material &material)
Definition: glyph.hpp:504
Definition: glyph.hpp:134
Definition: glyph.hpp:146
bool isValid() const
Definition: glyph.hpp:78
Definition: glyph.hpp:182
int setName(const char *name)
Definition: glyph.hpp:203
int setAxis(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:406
Definition: glyph.hpp:166