1 /**
2 A texture that shows a curve.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.curvetexture;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.texture;
25 import godot.curve;
26 /**
27 A texture that shows a curve.
28 
29 Renders a given $(D Curve) provided to it. Simplifies the task of drawing curves and/or saving them as image files.
30 */
31 @GodotBaseClass struct CurveTexture
32 {
33 	package(godot) enum string _GODOT_internal_name = "CurveTexture";
34 public:
35 @nogc nothrow:
36 	union { /** */ godot_object _godot_object; /** */ Texture _GODOT_base; }
37 	alias _GODOT_base this;
38 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
39 	package(godot) __gshared bool _classBindingInitialized = false;
40 	package(godot) static struct GDNativeClassBinding
41 	{
42 		__gshared:
43 		@GodotName("_update") GodotMethod!(void) _update;
44 		@GodotName("get_curve") GodotMethod!(Curve) getCurve;
45 		@GodotName("set_curve") GodotMethod!(void, Curve) setCurve;
46 		@GodotName("set_width") GodotMethod!(void, long) setWidth;
47 	}
48 	/// 
49 	pragma(inline, true) bool opEquals(in CurveTexture other) const
50 	{ return _godot_object.ptr is other._godot_object.ptr; }
51 	/// 
52 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
53 	{ _godot_object.ptr = n; return null; }
54 	/// 
55 	pragma(inline, true) bool opEquals(typeof(null) n) const
56 	{ return _godot_object.ptr is n; }
57 	/// 
58 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
59 	mixin baseCasts;
60 	/// Construct a new instance of CurveTexture.
61 	/// Note: use `memnew!CurveTexture` instead.
62 	static CurveTexture _new()
63 	{
64 		static godot_class_constructor constructor;
65 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("CurveTexture");
66 		if(constructor is null) return typeof(this).init;
67 		return cast(CurveTexture)(constructor());
68 	}
69 	@disable new(size_t s);
70 	/**
71 	
72 	*/
73 	void _update()
74 	{
75 		Array _GODOT_args = Array.make();
76 		String _GODOT_method_name = String("_update");
77 		this.callv(_GODOT_method_name, _GODOT_args);
78 	}
79 	/**
80 	
81 	*/
82 	Ref!Curve getCurve() const
83 	{
84 		checkClassBinding!(typeof(this))();
85 		return ptrcall!(Curve)(GDNativeClassBinding.getCurve, _godot_object);
86 	}
87 	/**
88 	
89 	*/
90 	void setCurve(Curve curve)
91 	{
92 		checkClassBinding!(typeof(this))();
93 		ptrcall!(void)(GDNativeClassBinding.setCurve, _godot_object, curve);
94 	}
95 	/**
96 	
97 	*/
98 	void setWidth(in long width)
99 	{
100 		checkClassBinding!(typeof(this))();
101 		ptrcall!(void)(GDNativeClassBinding.setWidth, _godot_object, width);
102 	}
103 	/**
104 	The `curve` rendered onto the texture.
105 	*/
106 	@property Curve curve()
107 	{
108 		return getCurve();
109 	}
110 	/// ditto
111 	@property void curve(Curve v)
112 	{
113 		setCurve(v);
114 	}
115 	/**
116 	The width of the texture.
117 	*/
118 	@property long width()
119 	{
120 		return getWidth();
121 	}
122 	/// ditto
123 	@property void width(long v)
124 	{
125 		setWidth(v);
126 	}
127 }