nanovg-bindings 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +8 -0
  3. data/README.md +1 -1
  4. data/lib/nanovg.rb +170 -170
  5. metadata +33 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7e8c5be891171a53172368b4a2f9218d993e9be5b087f5fcc8a878312a56858
4
- data.tar.gz: 9c33d617510b7e0cb2403365676663268251d07910ff6e09f3affb65657c60dc
3
+ metadata.gz: f8209efc95a9fc19d21d3add4f79d05c5069c6951a06b7a9e0c1c523efd19e57
4
+ data.tar.gz: faefdcbaf05388d9fa1f11d047c525057d8141c52f077965250f100f60d4ecd5
5
5
  SHA512:
6
- metadata.gz: 5974fb38d3219d91c4ecbc262df860e392e3d922f0d6966df52011a2ce2d740691c82150ff68e5f1df65c0eaaa795ec89d147e85a1de7505212e009ddb17fd71
7
- data.tar.gz: c6c799cfa0a311a0690c31cea55f2a03c78e4a46740cf476fb977f0ba916305bdb7ee6ff7afd916b7929bd3ae3cf09d1305cb97c007f7f0b72a4c4dbb2e44584
6
+ metadata.gz: f5668466e097988fa2ac37b7b84ac318e7c66b9c6f2220ce04486f3756b46af922e7bb5167be3b44f17d7a56e59f910b767b72b72dfdbb2f2d5c7be2ec6f9e18
7
+ data.tar.gz: ab406e4b5d22ddf6fd8428cc0f2b92259e4b95914aa25425a2b45ea3274b9e8b099008463916d3db1b3ab0d7a995ecce26257fdbcc9f6f9933849f6fe4cffc85
data/ChangeLog CHANGED
@@ -1,3 +1,11 @@
1
+ 2022-01-08 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * Changed API
4
+
5
+ 2022-01-07 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * Use opengl-bindings2
8
+
1
9
  2022-01-01 vaiorabbit <http://twitter.com/vaiorabbit>
2
10
 
3
11
  * nanovg-bindings.gemspec: Added
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Provides NanoVG ( https://github.com/memononen/nanovg ) interfaces for ruby (MRI).
4
4
 
5
5
  * Created : 2015-07-12
6
- * Last modified : 2022-01-01
6
+ * Last modified : 2022-01-08
7
7
 
8
8
  <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/example_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/emojifont_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/hex_gol_glider5_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/jpfont_rb.png" width="150"> <img src="https://raw.githubusercontent.com/vaiorabbit/nanovg-bindings/master/doc/mandelbrot_rb.png" width="150">
9
9
 
data/lib/nanovg.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'ffi'
2
2
 
3
- module NanoVG
3
+ module NVG
4
4
  extend FFI::Library
5
5
 
6
6
  #
@@ -8,93 +8,93 @@ module NanoVG
8
8
  #
9
9
 
10
10
  # NVGwinding
11
- NVG_CCW = 1
12
- NVG_CW = 2
11
+ CCW = 1
12
+ CW = 2
13
13
 
14
14
  # NVGsolidity
15
- NVG_SOLID = 1
16
- NVG_HOLE = 2
15
+ SOLID = 1
16
+ HOLE = 2
17
17
 
18
18
  # NVGlineCap
19
- NVG_BUTT = 0
20
- NVG_ROUND = 1
21
- NVG_SQUARE = 2
22
- NVG_BEVEL = 3
23
- NVG_MITER = 4
19
+ BUTT = 0
20
+ ROUND = 1
21
+ SQUARE = 2
22
+ BEVEL = 3
23
+ MITER = 4
24
24
 
25
25
  # NVGalign
26
26
  # Horizontal align
27
- NVG_ALIGN_LEFT = 1
28
- NVG_ALIGN_CENTER = 2
29
- NVG_ALIGN_RIGHT = 4
27
+ ALIGN_LEFT = 1
28
+ ALIGN_CENTER = 2
29
+ ALIGN_RIGHT = 4
30
30
  # Vertical align
31
- NVG_ALIGN_TOP = 8
32
- NVG_ALIGN_MIDDLE = 16
33
- NVG_ALIGN_BOTTOM = 32
34
- NVG_ALIGN_BASELINE = 64
31
+ ALIGN_TOP = 8
32
+ ALIGN_MIDDLE = 16
33
+ ALIGN_BOTTOM = 32
34
+ ALIGN_BASELINE = 64
35
35
 
36
36
  # NVGblendFactor
37
- NVG_ZERO = 1 << 0
38
- NVG_ONE = 1 << 1
39
- NVG_SRC_COLOR = 1 << 2
40
- NVG_ONE_MINUS_SRC_COLOR = 1 << 3
41
- NVG_DST_COLOR = 1 << 4
42
- NVG_ONE_MINUS_DST_COLOR = 1 << 5
43
- NVG_SRC_ALPHA = 1 << 6
44
- NVG_ONE_MINUS_SRC_ALPHA = 1 << 7
45
- NVG_DST_ALPHA = 1 << 8
46
- NVG_ONE_MINUS_DST_ALPHA = 1 << 9
47
- NVG_SRC_ALPHA_SATURATE = 1 << 10
37
+ ZERO = 1 << 0
38
+ ONE = 1 << 1
39
+ SRC_COLOR = 1 << 2
40
+ ONE_MINUS_SRC_COLOR = 1 << 3
41
+ DST_COLOR = 1 << 4
42
+ ONE_MINUS_DST_COLOR = 1 << 5
43
+ SRC_ALPHA = 1 << 6
44
+ ONE_MINUS_SRC_ALPHA = 1 << 7
45
+ DST_ALPHA = 1 << 8
46
+ ONE_MINUS_DST_ALPHA = 1 << 9
47
+ SRC_ALPHA_SATURATE = 1 << 10
48
48
 
49
49
  # NVGcompositeOperation
50
- NVG_SOURCE_OVER = 0
51
- NVG_SOURCE_IN = 1
52
- NVG_SOURCE_OUT = 2
53
- NVG_ATOP = 3
54
- NVG_DESTINATION_OVER = 4
55
- NVG_DESTINATION_IN = 5
56
- NVG_DESTINATION_OUT = 6
57
- NVG_DESTINATION_ATOP = 7
58
- NVG_LIGHTER = 8
59
- NVG_COPY = 9
60
- NVG_XOR = 10
50
+ SOURCE_OVER = 0
51
+ SOURCE_IN = 1
52
+ SOURCE_OUT = 2
53
+ ATOP = 3
54
+ DESTINATION_OVER = 4
55
+ DESTINATION_IN = 5
56
+ DESTINATION_OUT = 6
57
+ DESTINATION_ATOP = 7
58
+ LIGHTER = 8
59
+ COPY = 9
60
+ XOR = 10
61
61
 
62
62
  # NVGimageFlags
63
- NVG_IMAGE_GENERATE_MIPMAPS = 1
64
- NVG_IMAGE_REPEATX = 2
65
- NVG_IMAGE_REPEATY = 4
66
- NVG_IMAGE_FLIPY = 8
67
- NVG_IMAGE_PREMULTIPLIED = 16
68
- NVG_IMAGE_NEAREST = 32
63
+ IMAGE_GENERATE_MIPMAPS = 1
64
+ IMAGE_REPEATX = 2
65
+ IMAGE_REPEATY = 4
66
+ IMAGE_FLIPY = 8
67
+ IMAGE_PREMULTIPLIED = 16
68
+ IMAGE_NEAREST = 32
69
69
 
70
70
  # NVGcreateFlags
71
- NVG_ANTIALIAS = 1
72
- NVG_STENCIL_STROKES = 2
73
- NVG_DEBUG = 4
71
+ ANTIALIAS = 1
72
+ STENCIL_STROKES = 2
73
+ DEBUG = 4
74
74
 
75
75
  #
76
76
  # struct
77
77
  #
78
78
 
79
- class NVGcolor < FFI::Struct
79
+ class Color < FFI::Struct
80
80
  layout(
81
81
  :rgba, [:float, 4]
82
82
  )
83
83
  end
84
84
 
85
- class NVGpaint < FFI::Struct
85
+ class Paint < FFI::Struct
86
86
  layout(
87
87
  :xform, [:float, 6],
88
88
  :extent, [:float, 2],
89
89
  :radius, :float,
90
90
  :feather, :float,
91
- :innerColor, NVGcolor,
92
- :outerColor, NVGcolor,
91
+ :innerColor, Color,
92
+ :outerColor, Color,
93
93
  :image, :int32
94
94
  )
95
95
  end
96
96
 
97
- class NVGcompositeOperationState < FFI::Struct
97
+ class CompositeOperationState < FFI::Struct
98
98
  layout(
99
99
  :srcRGB, :int32,
100
100
  :dstRGB, :int32,
@@ -103,7 +103,7 @@ module NanoVG
103
103
  )
104
104
  end
105
105
 
106
- class NVGglyphPosition < FFI::Struct
106
+ class GlyphPosition < FFI::Struct
107
107
  layout(
108
108
  :str, :pointer,
109
109
  :x, :float,
@@ -112,7 +112,7 @@ module NanoVG
112
112
  )
113
113
  end
114
114
 
115
- class NVGtextRow < FFI::Struct
115
+ class TextRow < FFI::Struct
116
116
  layout(
117
117
  :start, :pointer,
118
118
  :end, :pointer,
@@ -138,132 +138,132 @@ module NanoVG
138
138
  #
139
139
  # Common API
140
140
  #
141
- attach_function :nvgBeginFrame, :nvgBeginFrame, [:pointer, :float, :float, :float], :void
142
- attach_function :nvgCancelFrame, :nvgCancelFrame, [:pointer], :void
143
- attach_function :nvgEndFrame, :nvgEndFrame, [:pointer], :void
144
-
145
- attach_function :nvgGlobalCompositeOperation, [:pointer, :int32], :void
146
- attach_function :nvgGlobalCompositeBlendFunc, [:pointer, :int32, :int32], :void
147
- attach_function :nvgGlobalCompositeBlendFuncSeparate, [:pointer, :int32, :int32, :int32, :int32], :void
148
-
149
- attach_function :nvgRGB, :nvgRGB, [:uint8, :uint8, :uint8], NVGcolor.by_value
150
- attach_function :nvgRGBf, :nvgRGBf, [:float, :float, :float], NVGcolor.by_value
151
- attach_function :nvgRGBA, :nvgRGBA, [:uint8, :uint8, :uint8, :uint8], NVGcolor.by_value
152
- attach_function :nvgRGBAf, :nvgRGBAf, [:float, :float, :float, :float], NVGcolor.by_value
153
-
154
- attach_function :nvgLerpRGBA, :nvgLerpRGBA, [NVGcolor.by_value, NVGcolor.by_value, :float], NVGcolor.by_value
155
- attach_function :nvgTransRGBA, :nvgTransRGBA, [NVGcolor.by_value, :uint8], NVGcolor.by_value
156
- attach_function :nvgTransRGBAf, :nvgTransRGBAf, [NVGcolor.by_value, :float], NVGcolor.by_value
157
- attach_function :nvgHSL, :nvgHSL, [:float, :float, :float], NVGcolor.by_value
158
- attach_function :nvgHSLA, :nvgHSLA, [:float, :float, :float, :uint8], NVGcolor.by_value
159
-
160
- attach_function :nvgSave, :nvgSave, [:pointer], :void
161
- attach_function :nvgRestore, :nvgRestore, [:pointer], :void
162
- attach_function :nvgReset, :nvgReset, [:pointer], :void
163
-
164
- attach_function :nvgShapeAntiAlias, :nvgShapeAntiAlias, [:pointer, NVGcolor.by_value], :void
165
- attach_function :nvgStrokeColor, :nvgStrokeColor, [:pointer, NVGcolor.by_value], :void
166
- attach_function :nvgStrokePaint, [:pointer, NVGpaint.by_value], :void
167
- attach_function :nvgFillColor, [:pointer, NVGcolor.by_value], :void
168
- attach_function :nvgFillPaint, [:pointer, NVGpaint.by_value], :void
169
- attach_function :nvgMiterLimit, [:pointer, :float], :void
170
- attach_function :nvgStrokeWidth, [:pointer, :float], :void
171
- attach_function :nvgLineCap, [:pointer, :int32], :void
172
- attach_function :nvgLineJoin, [:pointer, :int32], :void
173
- attach_function :nvgGlobalAlpha, [:pointer, :float], :void
174
-
175
- attach_function :nvgResetTransform, :nvgResetTransform, [:pointer], :void
176
- attach_function :nvgTransform, :nvgTransform, [:pointer, :float, :float, :float, :float, :float, :float], :void
177
- attach_function :nvgTranslate, :nvgTranslate, [:pointer, :float, :float], :void
178
- attach_function :nvgRotate, :nvgRotate, [:pointer, :float], :void
179
- attach_function :nvgSkewX, :nvgSkewX, [:pointer, :float], :void
180
- attach_function :nvgSkewY, :nvgSkewY, [:pointer, :float], :void
181
- attach_function :nvgScale, :nvgScale, [:pointer, :float, :float], :void
182
- attach_function :nvgCurrentTransform, :nvgCurrentTransform, [:pointer, :pointer], :void
183
-
184
- attach_function :nvgTransformIdentity, :nvgTransformIdentity, [:pointer], :void
185
- attach_function :nvgTransformTranslate, :nvgTransformTranslate, [:pointer, :float, :float], :void
186
- attach_function :nvgTransformScale, :nvgTransformScale, [:pointer, :float, :float], :void
187
- attach_function :nvgTransformRotate, :nvgTransformRotate, [:pointer, :float], :void
188
- attach_function :nvgTransformSkewX, :nvgTransformSkewX, [:pointer, :float], :void
189
- attach_function :nvgTransformSkewY, :nvgTransformSkewY, [:pointer, :float], :void
190
- attach_function :nvgTransformMultiply, :nvgTransformMultiply, [:pointer, :pointer], :void
191
- attach_function :nvgTransformPremultiply, :nvgTransformPremultiply, [:pointer, :pointer], :void
192
- attach_function :nvgTransformInverse, :nvgTransformInverse, [:pointer, :pointer], :int32
193
- attach_function :nvgTransformPoint, :nvgTransformPoint, [:pointer, :pointer, :pointer, :float, :float], :void
194
-
195
- attach_function :nvgDegToRad, :nvgDegToRad, [:float], :float
196
- attach_function :nvgRadToDeg, :nvgRadToDeg, [:float], :float
197
-
198
- attach_function :nvgCreateImage, :nvgCreateImage, [:pointer, :pointer, :int32], :int32
199
- attach_function :nvgCreateImageMem, :nvgCreateImageMem, [:pointer, :int32, :pointer, :int32], :int32
200
- attach_function :nvgCreateImageRGBA, :nvgCreateImageRGBA, [:pointer, :int32, :int32, :int32, :pointer], :int32
201
- attach_function :nvgUpdateImage, :nvgUpdateImage, [:pointer, :int32, :pointer], :void
202
- attach_function :nvgImageSize, :nvgImageSize, [:pointer, :int32, :pointer, :pointer], :void
203
- attach_function :nvgDeleteImage, :nvgDeleteImage, [:pointer, :int32], :void
204
-
205
- attach_function :nvgLinearGradient, :nvgLinearGradient, [:pointer, :float, :float, :float, :float, NVGcolor.by_value, NVGcolor.by_value], NVGpaint.by_value
206
- attach_function :nvgBoxGradient, :nvgBoxGradient, [:pointer, :float, :float, :float, :float, :float, :float, NVGcolor.by_value, NVGcolor.by_value], NVGpaint.by_value
207
- attach_function :nvgRadialGradient, :nvgRadialGradient, [:pointer, :float, :float, :float, :float, NVGcolor.by_value, NVGcolor.by_value], NVGpaint.by_value
208
- attach_function :nvgImagePattern, :nvgImagePattern, [:pointer, :float, :float, :float, :float, :float, :int32, :float], NVGpaint.by_value
209
-
210
- attach_function :nvgScissor, :nvgScissor, [:pointer, :float, :float, :float, :float], :void
211
- attach_function :nvgIntersectScissor, :nvgIntersectScissor, [:pointer, :float, :float, :float, :float], :void
212
- attach_function :nvgResetScissor, :nvgResetScissor, [:pointer], :void
213
-
214
- attach_function :nvgBeginPath, :nvgBeginPath, [:pointer], :void
215
- attach_function :nvgMoveTo, :nvgMoveTo, [:pointer, :float, :float], :void
216
- attach_function :nvgLineTo, :nvgLineTo, [:pointer, :float, :float], :void
217
- attach_function :nvgBezierTo, :nvgBezierTo, [:pointer, :float, :float, :float, :float, :float, :float], :void
218
- attach_function :nvgQuadTo, :nvgQuadTo, [:pointer, :float, :float, :float, :float], :void
219
- attach_function :nvgArcTo, :nvgArcTo, [:pointer, :float, :float, :float, :float, :float], :void
220
- attach_function :nvgClosePath, :nvgClosePath, [:pointer], :void
221
- attach_function :nvgPathWinding, :nvgPathWinding, [:pointer, :int32], :void
222
- attach_function :nvgArc, :nvgArc, [:pointer, :float, :float, :float, :float, :float, :int32], :void
223
- attach_function :nvgRect, :nvgRect, [:pointer, :float, :float, :float, :float], :void
224
- attach_function :nvgRoundedRect, :nvgRoundedRect, [:pointer, :float, :float, :float, :float, :float], :void
225
- attach_function :nvgRoundedRectVarying, :nvgRoundedRectVarying, [:pointer, :float, :float, :float, :float, :float, :float, :float, :float], :void
226
- attach_function :nvgEllipse, :nvgEllipse, [:pointer, :float, :float, :float, :float], :void
227
- attach_function :nvgCircle, :nvgCircle, [:pointer, :float, :float, :float], :void
228
- attach_function :nvgFill, :nvgFill, [:pointer], :void
229
- attach_function :nvgStroke, :nvgStroke, [:pointer], :void
230
-
231
- attach_function :nvgCreateFont, :nvgCreateFont, [:pointer, :pointer, :pointer], :int32
232
- attach_function :nvgCreateFontMem, :nvgCreateFontMem, [:pointer, :pointer, :pointer, :int32, :int32], :int32
233
- attach_function :nvgFindFont, :nvgFindFont, [:pointer, :pointer], :int32
234
- attach_function :nvgAddFallbackFontId, :nvgAddFallbackFontId, [:pointer, :int32, :int32], :int32
235
- attach_function :nvgAddFallbackFont, :nvgAddFallbackFont, [:pointer, :pointer, :pointer], :int32
236
- attach_function :nvgFontSize, :nvgFontSize, [:pointer, :float], :void
237
- attach_function :nvgFontBlur, :nvgFontBlur, [:pointer, :float], :void
238
- attach_function :nvgTextLetterSpacing, :nvgTextLetterSpacing, [:pointer, :float], :void
239
- attach_function :nvgTextLineHeight, :nvgTextLineHeight, [:pointer, :float], :void
240
- attach_function :nvgTextAlign, :nvgTextAlign, [:pointer, :int32], :void
241
- attach_function :nvgFontFaceId, :nvgFontFaceId, [:pointer, :int32], :void
242
- attach_function :nvgFontFace, :nvgFontFace, [:pointer, :pointer], :void
243
- attach_function :nvgText, :nvgText, [:pointer, :float, :float, :pointer, :pointer], :float
244
- attach_function :nvgTextBox, :nvgTextBox, [:pointer, :float, :float, :float, :pointer, :pointer], :void
245
- attach_function :nvgTextBounds, :nvgTextBounds, [:pointer, :float, :float, :pointer, :pointer, :pointer], :float
246
- attach_function :nvgTextBoxBounds, :nvgTextBoxBounds, [:pointer, :float, :float, :float, :pointer, :pointer, :pointer], :void
247
- attach_function :nvgTextGlyphPositions, :nvgTextGlyphPositions, [:pointer, :float, :float, :pointer, :pointer, :pointer, :int32], :int32
248
- attach_function :nvgTextMetrics, :nvgTextMetrics, [:pointer, :pointer, :pointer, :pointer], :void
249
- attach_function :nvgTextBreakLines, :nvgTextBreakLines, [:pointer, :pointer, :pointer, :float, :pointer, :int32], :int32
141
+ attach_function :BeginFrame, :nvgBeginFrame, [:pointer, :float, :float, :float], :void
142
+ attach_function :CancelFrame, :nvgCancelFrame, [:pointer], :void
143
+ attach_function :EndFrame, :nvgEndFrame, [:pointer], :void
144
+
145
+ attach_function :GlobalCompositeOperation, :nvgGlobalCompositeOperation, [:pointer, :int32], :void
146
+ attach_function :GlobalCompositeBlendFunc, :nvgGlobalCompositeBlendFunc, [:pointer, :int32, :int32], :void
147
+ attach_function :GlobalCompositeBlendFuncSeparate, :nvgGlobalCompositeBlendFuncSeparate, [:pointer, :int32, :int32, :int32, :int32], :void
148
+
149
+ attach_function :RGB, :nvgRGB, [:uint8, :uint8, :uint8], Color.by_value
150
+ attach_function :RGBf, :nvgRGBf, [:float, :float, :float], Color.by_value
151
+ attach_function :RGBA, :nvgRGBA, [:uint8, :uint8, :uint8, :uint8], Color.by_value
152
+ attach_function :RGBAf, :nvgRGBAf, [:float, :float, :float, :float], Color.by_value
153
+
154
+ attach_function :LerpRGBA, :nvgLerpRGBA, [Color.by_value, Color.by_value, :float], Color.by_value
155
+ attach_function :TransRGBA, :nvgTransRGBA, [Color.by_value, :uint8], Color.by_value
156
+ attach_function :TransRGBAf, :nvgTransRGBAf, [Color.by_value, :float], Color.by_value
157
+ attach_function :HSL, :nvgHSL, [:float, :float, :float], Color.by_value
158
+ attach_function :HSLA, :nvgHSLA, [:float, :float, :float, :uint8], Color.by_value
159
+
160
+ attach_function :Save, :nvgSave, [:pointer], :void
161
+ attach_function :Restore, :nvgRestore, [:pointer], :void
162
+ attach_function :Reset, :nvgReset, [:pointer], :void
163
+
164
+ attach_function :ShapeAntiAlias, :nvgShapeAntiAlias, [:pointer, Color.by_value], :void
165
+ attach_function :StrokeColor, :nvgStrokeColor, [:pointer, Color.by_value], :void
166
+ attach_function :StrokePaint, :nvgStrokePaint, [:pointer, Paint.by_value], :void
167
+ attach_function :FillColor, :nvgFillColor, [:pointer, Color.by_value], :void
168
+ attach_function :FillPaint, :nvgFillPaint, [:pointer, Paint.by_value], :void
169
+ attach_function :MiterLimit, :nvgMiterLimit, [:pointer, :float], :void
170
+ attach_function :StrokeWidth, :nvgStrokeWidth, [:pointer, :float], :void
171
+ attach_function :LineCap, :nvgLineCap, [:pointer, :int32], :void
172
+ attach_function :LineJoin, :nvgLineJoin, [:pointer, :int32], :void
173
+ attach_function :GlobalAlpha, :nvgGlobalAlpha, [:pointer, :float], :void
174
+
175
+ attach_function :ResetTransform, :nvgResetTransform, [:pointer], :void
176
+ attach_function :Transform, :nvgTransform, [:pointer, :float, :float, :float, :float, :float, :float], :void
177
+ attach_function :Translate, :nvgTranslate, [:pointer, :float, :float], :void
178
+ attach_function :Rotate, :nvgRotate, [:pointer, :float], :void
179
+ attach_function :SkewX, :nvgSkewX, [:pointer, :float], :void
180
+ attach_function :SkewY, :nvgSkewY, [:pointer, :float], :void
181
+ attach_function :Scale, :nvgScale, [:pointer, :float, :float], :void
182
+ attach_function :CurrentTransform, :nvgCurrentTransform, [:pointer, :pointer], :void
183
+
184
+ attach_function :TransformIdentity, :nvgTransformIdentity, [:pointer], :void
185
+ attach_function :TransformTranslate, :nvgTransformTranslate, [:pointer, :float, :float], :void
186
+ attach_function :TransformScale, :nvgTransformScale, [:pointer, :float, :float], :void
187
+ attach_function :TransformRotate, :nvgTransformRotate, [:pointer, :float], :void
188
+ attach_function :TransformSkewX, :nvgTransformSkewX, [:pointer, :float], :void
189
+ attach_function :TransformSkewY, :nvgTransformSkewY, [:pointer, :float], :void
190
+ attach_function :TransformMultiply, :nvgTransformMultiply, [:pointer, :pointer], :void
191
+ attach_function :TransformPremultiply, :nvgTransformPremultiply, [:pointer, :pointer], :void
192
+ attach_function :TransformInverse, :nvgTransformInverse, [:pointer, :pointer], :int32
193
+ attach_function :TransformPoint, :nvgTransformPoint, [:pointer, :pointer, :pointer, :float, :float], :void
194
+
195
+ attach_function :DegToRad, :nvgDegToRad, [:float], :float
196
+ attach_function :RadToDeg, :nvgRadToDeg, [:float], :float
197
+
198
+ attach_function :CreateImage, :nvgCreateImage, [:pointer, :pointer, :int32], :int32
199
+ attach_function :CreateImageMem, :nvgCreateImageMem, [:pointer, :int32, :pointer, :int32], :int32
200
+ attach_function :CreateImageRGBA, :nvgCreateImageRGBA, [:pointer, :int32, :int32, :int32, :pointer], :int32
201
+ attach_function :UpdateImage, :nvgUpdateImage, [:pointer, :int32, :pointer], :void
202
+ attach_function :ImageSize, :nvgImageSize, [:pointer, :int32, :pointer, :pointer], :void
203
+ attach_function :DeleteImage, :nvgDeleteImage, [:pointer, :int32], :void
204
+
205
+ attach_function :LinearGradient, :nvgLinearGradient, [:pointer, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
206
+ attach_function :BoxGradient, :nvgBoxGradient, [:pointer, :float, :float, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
207
+ attach_function :RadialGradient, :nvgRadialGradient, [:pointer, :float, :float, :float, :float, Color.by_value, Color.by_value], Paint.by_value
208
+ attach_function :ImagePattern, :nvgImagePattern, [:pointer, :float, :float, :float, :float, :float, :int32, :float], Paint.by_value
209
+
210
+ attach_function :Scissor, :nvgScissor, [:pointer, :float, :float, :float, :float], :void
211
+ attach_function :IntersectScissor, :nvgIntersectScissor, [:pointer, :float, :float, :float, :float], :void
212
+ attach_function :ResetScissor, :nvgResetScissor, [:pointer], :void
213
+
214
+ attach_function :BeginPath, :nvgBeginPath, [:pointer], :void
215
+ attach_function :MoveTo, :nvgMoveTo, [:pointer, :float, :float], :void
216
+ attach_function :LineTo, :nvgLineTo, [:pointer, :float, :float], :void
217
+ attach_function :BezierTo, :nvgBezierTo, [:pointer, :float, :float, :float, :float, :float, :float], :void
218
+ attach_function :QuadTo, :nvgQuadTo, [:pointer, :float, :float, :float, :float], :void
219
+ attach_function :ArcTo, :nvgArcTo, [:pointer, :float, :float, :float, :float, :float], :void
220
+ attach_function :ClosePath, :nvgClosePath, [:pointer], :void
221
+ attach_function :PathWinding, :nvgPathWinding, [:pointer, :int32], :void
222
+ attach_function :Arc, :nvgArc, [:pointer, :float, :float, :float, :float, :float, :int32], :void
223
+ attach_function :Rect, :nvgRect, [:pointer, :float, :float, :float, :float], :void
224
+ attach_function :RoundedRect, :nvgRoundedRect, [:pointer, :float, :float, :float, :float, :float], :void
225
+ attach_function :RoundedRectVarying, :nvgRoundedRectVarying, [:pointer, :float, :float, :float, :float, :float, :float, :float, :float], :void
226
+ attach_function :Ellipse, :nvgEllipse, [:pointer, :float, :float, :float, :float], :void
227
+ attach_function :Circle, :nvgCircle, [:pointer, :float, :float, :float], :void
228
+ attach_function :Fill, :nvgFill, [:pointer], :void
229
+ attach_function :Stroke, :nvgStroke, [:pointer], :void
230
+
231
+ attach_function :CreateFont, :nvgCreateFont, [:pointer, :pointer, :pointer], :int32
232
+ attach_function :CreateFontMem, :nvgCreateFontMem, [:pointer, :pointer, :pointer, :int32, :int32], :int32
233
+ attach_function :FindFont, :nvgFindFont, [:pointer, :pointer], :int32
234
+ attach_function :AddFallbackFontId, :nvgAddFallbackFontId, [:pointer, :int32, :int32], :int32
235
+ attach_function :AddFallbackFont, :nvgAddFallbackFont, [:pointer, :pointer, :pointer], :int32
236
+ attach_function :FontSize, :nvgFontSize, [:pointer, :float], :void
237
+ attach_function :FontBlur, :nvgFontBlur, [:pointer, :float], :void
238
+ attach_function :TextLetterSpacing, :nvgTextLetterSpacing, [:pointer, :float], :void
239
+ attach_function :TextLineHeight, :nvgTextLineHeight, [:pointer, :float], :void
240
+ attach_function :TextAlign, :nvgTextAlign, [:pointer, :int32], :void
241
+ attach_function :FontFaceId, :nvgFontFaceId, [:pointer, :int32], :void
242
+ attach_function :FontFace, :nvgFontFace, [:pointer, :pointer], :void
243
+ attach_function :Text, :nvgText, [:pointer, :float, :float, :pointer, :pointer], :float
244
+ attach_function :TextBox, :nvgTextBox, [:pointer, :float, :float, :float, :pointer, :pointer], :void
245
+ attach_function :TextBounds, :nvgTextBounds, [:pointer, :float, :float, :pointer, :pointer, :pointer], :float
246
+ attach_function :TextBoxBounds, :nvgTextBoxBounds, [:pointer, :float, :float, :float, :pointer, :pointer, :pointer], :void
247
+ attach_function :TextGlyphPositions, :nvgTextGlyphPositions, [:pointer, :float, :float, :pointer, :pointer, :pointer, :int32], :int32
248
+ attach_function :TextMetrics, :nvgTextMetrics, [:pointer, :pointer, :pointer, :pointer], :void
249
+ attach_function :TextBreakLines, :nvgTextBreakLines, [:pointer, :pointer, :pointer, :float, :pointer, :int32], :int32
250
250
 
251
251
  #
252
252
  # GL2-specific API (nanovg_gl)
253
253
  #
254
254
  if render_backend == :gl2
255
- attach_function :nvgCreateGL2, :nvgCreateGL2, [:int32], :pointer
256
- attach_function :nvgDeleteGL2, :nvgDeleteGL2, [:pointer], :void
257
- attach_function :nvgSetupGL2, :nvgSetupGL2, [], :void
255
+ attach_function :CreateGL2, :nvgCreateGL2, [:int32], :pointer
256
+ attach_function :DeleteGL2, :nvgDeleteGL2, [:pointer], :void
257
+ attach_function :SetupGL2, :nvgSetupGL2, [], :void
258
258
  end
259
259
 
260
260
  #
261
261
  # GL3-specific API (nanovg_gl)
262
262
  #
263
263
  if render_backend == :gl3
264
- attach_function :nvgCreateGL3, :nvgCreateGL3, [:int32], :pointer
265
- attach_function :nvgDeleteGL3, :nvgDeleteGL3, [:pointer], :void
266
- attach_function :nvgSetupGL3, :nvgSetupGL3, [], :void
264
+ attach_function :CreateGL3, :nvgCreateGL3, [:int32], :pointer
265
+ attach_function :DeleteGL3, :nvgDeleteGL3, [:pointer], :void
266
+ attach_function :SetupGL3, :nvgSetupGL3, [], :void
267
267
  end
268
268
 
269
269
  @@nanovg_import_done = true
metadata CHANGED
@@ -1,16 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanovg-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-01 00:00:00.000000000 Z
12
- dependencies: []
13
- description: 'Ruby bindings for NanoVG.
11
+ date: 2022-01-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.15'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: opengl-bindings2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
41
+ description: 'Ruby bindings for NanoVG ( https://github.com/memononen/nanovg ).
14
42
 
15
43
  '
16
44
  email:
@@ -46,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
74
  - !ruby/object:Gem::Version
47
75
  version: '0'
48
76
  requirements: []
49
- rubygems_version: 3.3.3
77
+ rubygems_version: 3.3.4
50
78
  signing_key:
51
79
  specification_version: 4
52
80
  summary: Bindings for NanoVG