PIKApp/app/core/pikabrushgenerated.h

93 lines
4.4 KiB
C

/* PIKA - Photo and Image Kooker Application
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* brush_generated module Copyright 1998 Jay Cox <jaycox@earthlink.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_BRUSH_GENERATED_H__
#define __PIKA_BRUSH_GENERATED_H__
#include "pikabrush.h"
#define PIKA_TYPE_BRUSH_GENERATED (pika_brush_generated_get_type ())
#define PIKA_BRUSH_GENERATED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_BRUSH_GENERATED, PikaBrushGenerated))
#define PIKA_BRUSH_GENERATED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_BRUSH_GENERATED, PikaBrushGeneratedClass))
#define PIKA_IS_BRUSH_GENERATED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_BRUSH_GENERATED))
#define PIKA_IS_BRUSH_GENERATED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_BRUSH_GENERATED))
#define PIKA_BRUSH_GENERATED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_BRUSH_GENERATED, PikaBrushGeneratedClass))
typedef struct _PikaBrushGeneratedClass PikaBrushGeneratedClass;
struct _PikaBrushGenerated
{
PikaBrush parent_instance;
PikaBrushGeneratedShape shape;
gfloat radius;
gint spikes; /* 2 - 20 */
gfloat hardness; /* 0.0 - 1.0 */
gfloat aspect_ratio; /* y/x */
gfloat angle; /* in degrees */
};
struct _PikaBrushGeneratedClass
{
PikaBrushClass parent_class;
};
GType pika_brush_generated_get_type (void) G_GNUC_CONST;
PikaData * pika_brush_generated_new (const gchar *name,
PikaBrushGeneratedShape shape,
gfloat radius,
gint spikes,
gfloat hardness,
gfloat aspect_ratio,
gfloat angle);
PikaBrushGeneratedShape
pika_brush_generated_set_shape (PikaBrushGenerated *brush,
PikaBrushGeneratedShape shape);
gfloat pika_brush_generated_set_radius (PikaBrushGenerated *brush,
gfloat radius);
gint pika_brush_generated_set_spikes (PikaBrushGenerated *brush,
gint spikes);
gfloat pika_brush_generated_set_hardness (PikaBrushGenerated *brush,
gfloat hardness);
gfloat pika_brush_generated_set_aspect_ratio (PikaBrushGenerated *brush,
gfloat ratio);
gfloat pika_brush_generated_set_angle (PikaBrushGenerated *brush,
gfloat angle);
PikaBrushGeneratedShape
pika_brush_generated_get_shape (PikaBrushGenerated *brush);
gfloat pika_brush_generated_get_radius (PikaBrushGenerated *brush);
gint pika_brush_generated_get_spikes (PikaBrushGenerated *brush);
gfloat pika_brush_generated_get_hardness (PikaBrushGenerated *brush);
gfloat pika_brush_generated_get_aspect_ratio (PikaBrushGenerated *brush);
gfloat pika_brush_generated_get_angle (PikaBrushGenerated *brush);
#endif /* __PIKA_BRUSH_GENERATED_H__ */