![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyShaderGwyShader — |
GwyShader; GwyShaderClass; GtkWidget* gwy_shader_new (const gchar *gradient); gdouble gwy_shader_get_theta (GwyShader *shader); gdouble gwy_shader_get_phi (GwyShader *shader); void gwy_shader_set_theta (GwyShader *shader, gdouble theta); void gwy_shader_set_phi (GwyShader *shader, gdouble phi); void gwy_shader_set_angle (GwyShader *shader, gdouble theta, gdouble phi); const gchar* gwy_shader_get_gradient (GwyShader *shader); void gwy_shader_set_gradient (GwyShader *shader, const gchar *gradient); GtkUpdateType gwy_shader_get_update_policy (GwyShader *shader); void gwy_shader_set_update_policy (GwyShader *shader, GtkUpdateType update_policy);
typedef struct { GtkWidgetClass parent_class; void (*angle_changed)(GwyShader *shader); gpointer reserved1; } GwyShaderClass;
GtkWidget* gwy_shader_new (const gchar *gradient);
Creates a new spherical shader.
The widget takes up all the space allocated for it.
gradient : | Name of gradient to color the spehere with. Can be NULL to use the default gray gradient. |
Returns : | The new shader as a GtkWidget. |
Since 1.8
gdouble gwy_shader_get_theta (GwyShader *shader);
Returns the theta coordinate of a shader.
shader : | A shader. |
Returns : | The theta coordinate, in radians. Theta coordinate is angle from sphere's north pole. |
Since 1.8
gdouble gwy_shader_get_phi (GwyShader *shader);
Returns the phi coordinate of a shader.
shader : | A shader. |
Returns : | The phi coordinate, in radians. Phi coordinate is orientation in horizontal plane, measured from x axis, counterclockwise. |
Since 1.8
void gwy_shader_set_theta (GwyShader *shader, gdouble theta);
Sets the theta coordinate of a shader.
shader : | A shader. |
theta : | The theta coordinate to set. See gwy_shader_get_theta() for description. |
Since 1.8
void gwy_shader_set_phi (GwyShader *shader, gdouble phi);
Sets the phi coordinate of a shader.
shader : | A shader. |
phi : | The phi coordinate to set. See gwy_shader_get_phi() for description. |
Since 1.8
void gwy_shader_set_angle (GwyShader *shader, gdouble theta, gdouble phi);
Sets the spherical angle of a shader.
shader : | A shader. |
theta : | The theta coordinate to set. See gwy_shader_get_theta() for description. |
phi : | The phi coordinate to set. See gwy_shader_get_phi() for description. |
Since 1.8
const gchar* gwy_shader_get_gradient (GwyShader *shader);
Returns the name of color gradient a shader uses.
shader : | A shader. |
Returns : | The gradient name. It must not be modified or freed. It may differ the name that was used on initialization or set with gwy_shader_set_gradient(), if the gradient didn't exist or was renamed meanwhile. |
Since 1.8
void gwy_shader_set_gradient (GwyShader *shader, const gchar *gradient);
Sets the gradient a shader uses.
shader : | A shader. |
gradient : | Name of gradient shader should use. It should exist. |
Since 1.8
GtkUpdateType gwy_shader_get_update_policy (GwyShader *shader);
Returns the update policy of a shader.
shader : | A shader. |
Returns : | The update policy. |
Since 1.8
void gwy_shader_set_update_policy (GwyShader *shader, GtkUpdateType update_policy);
Sets the update policy of a shader.
shader : | A shader. |
update_policy : | The update policy shader should use. |
Since 1.8
"gradient" gchararray : Read / Write
Name of gradient the sphere is colored with.
Default value: NULL
"update-policy" GtkUpdateType : Read / Write
When value change causes signal emission.
Default value: GTK_UPDATE_CONTINUOUS
<< GwyStatusbar | GwyToolbox >> |