Mikko Mononen
84595438f3
Fix for issue #127
- set stb_image flags so that it loads correct data in iPhone
11 years ago
StarWing
5dd2c49fe6
update upstream stb things.
11 years ago
StarWing
4712e5b615
Auto detect and resize text atlas texture.
11 years ago
Scott Graham
bc136b26c8
clamp on scissor, fix nvgReset
11 years ago
Scott Graham
aefc9a6104
use -1 as the 'no scissor' value, rather than 0, so that 0 width still scissors
11 years ago
Scott Graham
c20125c941
second attempt at avoiding warnings at /W4 on vs2013
11 years ago
Mikko Mononen
ed86765026
Removed unused mx,my,len
11 years ago
Christian Forfang
565fa16265
Fixed missing void in function with no parameters
11 years ago
Christian Forfang
893f31c318
Fixed potentially uninitialized local variable warning
11 years ago
Mikko Mononen
ec2dfba0f1
Removed unused mu variable
11 years ago
Mikko Mononen
c648e0dcf1
Fix for issue #108
- fixed stroke cap tessellation amount calculation
11 years ago
Mikko Mononen
a98d17cf24
Fix for issue #111
- added nvgQuadTo, draws quadratic bezier curve segment
11 years ago
Mikko Mononen
709475c513
API changed! Fixed slowdown, Shader uses premultiplied colors
- all colors in the shader is handled as premultiplied
- removed alphaBlend param from nvgBeginFrame(), it became obsolete
- added NVGL_TEXTURE_PREMULTIPLIED flag
- separated FBO example
- FBOs are treated as premultipied for correct alpha
- changed FBO storage from depth/stencil 24/8 to stencil 8
- moved discard to end of shader which restores the render speed again
11 years ago
Mikko Mononen
003561e721
Fix for issue #92
- added (optional) 3-pass stencil trick to stroke rendering, reduces
overdraw artifacts, a little slower
- fixed some text bounds issues
11 years ago
Mikko Mononen
84bec2962e
Fix for issue #95
- Added alpha for images
- Added global alpha
11 years ago
Mikko Mononen
f0994aee92
Fix for issue #100
- fixed glyph position bounds for whitespace
11 years ago
Mikko Mononen
59030bf722
Separated fill and store expansion code
11 years ago
StarWing
bea097165b
add external APIs to GL backend to get native Texture Id.
11 years ago
Mikko Mononen
bf2037a426
Fix for issue #94
- bezier tessellation was using second control point instead of last
point in error calculation
11 years ago
Jorge Acereda
6a96f91abf
Relax stroke width limit
11 years ago
Mikko Mononen
1da366c239
Fix for issue #82
- fixed basic shape windings
- clamp radius of rounded rect so that it behaves nicely when squashed
11 years ago
Mikko Mononen
44c168b84e
Fix for issue #75
- fixed copy/paste bug in bevel calculations
11 years ago
Mikko Mononen
611b043fff
Fix for issue #77
- line caps did not consider AA width
11 years ago
Mikko Mononen
02ca24ad75
Fix to update alloc count after successful alloc
11 years ago
Mikko Mononen
7f55decf8f
More error checking on allocations
- changed remainder of allocations to follow same 1.5x patters
- do not leak memory when realloc() fails
- added error handling in case allocations fail
11 years ago
Mikko Mononen
b2d93429e5
Fixed issue #80
- increased initial buffer sizes
- change all allocator patterns to over allocate by 1.5x
- fixes bug where nvgl back-end was not allocating +n as requested
11 years ago
Mikko Mononen
4cc5fd68d1
Improved nvgTextGlyphPositions()
- added glyph min/max x
- fixed first glyph position
11 years ago
Mikko Mononen
5a4e5a3d7c
Added nvgCurrentTransform() and exposed matrix functions
- added nvgCurrentTransform() which allows to get the current
transformation matrix
- added skew x/y transforms
- exposed functions 2x3 matrix functions
- exposed point transform
- added deg/rad conversion functions
11 years ago
Mikko Mononen
be16b4dff3
Made old GL backends obsolete, added docs
- added documentation about changed GL state
- made old GL2 and GL3 backends obsolete
11 years ago
Mikko Mononen
6edc46e5b0
Allow small strokes, fixed textBoxBounds()
- added test for multiple stroke widths
- allow stroke width down to 1px size, then scale with alpha
- fixed textBoxBounds() in hi-dpi
11 years ago
Mikko Mononen
b416f76b1c
Added nvgTextBoxBounds, fixed nvgTextBounds
- nvgTextBounds() API changed, assumes x,y as input too
- fixed nvgTextBounds() return values
- added nvgTextBoxBounds()
- text line width is handle more consistently
- added note about return values of text measure funds
- changed demo to show text(box)bounds usage
11 years ago
Mikko Mononen
9d367dcb81
GL3buf backend supports GL2 too (not yet enabled)
- added support for GL(ES)2 for nanovg_gl3buf (something is still not
quite there)
- nanovg now sets all required GL state
- removed compiler warnings about unused vars
11 years ago
Mikko Mononen
fdb96903c8
Fixed text related calculations for hi-dpi rendering
- calculate all text related stuff using scaling
- removed a couple of compiler warnings
- tweaked caret picking
11 years ago
Mikko Mononen
7a282bd934
Added some TODOs, no return value for textbox
11 years ago
Mikko Mononen
635f4a4afb
Added multi-line text drawing
- fixed some warnings
- changed nvgLetterSpacing() to nvgTextLetterSpacing()
- added nvgTextBox()
- added nvgTextLineHeight()
- added some documentation
11 years ago
Mikko Mononen
ff8b521506
Added text break line and glyph position functions
- added debug configs for the lib
- added more data for font stash text iterator (ptr to current and next
position in string, code point)
- renamed nvgVertMetrics() to nvgTextMetrics()
- added nvgTextGlyphPositions() which returns glyph x position for the
text
- added nvgTextBreakLines breaks a text into multiple rows based on
newlines and max row width
- tweaked tessellation tolerance
11 years ago
Mikko Mononen
888103db39
Adjusted tessellation
- changed tessellation flatness test which produces less vertices
(especially when using straight lines)
- added nvgDebugDumpPathCache which allows to dump path cache state to
stout
11 years ago
Doug Binks
f398f26018
Bugfix to nvgRGBf
11 years ago
Doug Binks
c3f50b9c01
Removed nvgIsBlack, and added isBlack to demo.c
11 years ago
Doug Binks
253dc627e7
Added nvgTransRGBAf
11 years ago
Doug Binks
a83913bc87
Added nvgRGBf and nvgRGBAf constructor functions.
11 years ago
Doug Binks
466ab4b19a
Converted spaces to tabs.
11 years ago
Doug Binks
d16b4df7fd
Warning/Error fix: added int return type to nvgIsBlack
11 years ago
Doug Binks
3d3582cd9a
Moved to floating point color via NVGcolor structure.
Currently working with gl3buf backend.
11 years ago
Mikko Mononen
0262883c55
Fixes for AA on retina, a bit finer tessellation
- changed tessellation threshold from 0.3 to 0.25
- fixed scissor AA on retina
- fixed stroke AA on retina
11 years ago
Kyle Gretchev
db5c78fb00
Variable initialization, unused var removal, and casts.
Removed some unused variables to silence compiler warnings, initialized
variables to 0, added varialbe casts to silence additional compiler
warnings.
11 years ago
Mikko Mononen
8b55ae414e
Improved miter and bevel line joins
11 years ago
Mikko Mononen
ba3c0cbce1
Fix for issue #40 : Added support to render using premultiplied alpha
- added support to take screen shots
- added support to render to frame buffer using premultiplied alpha
- fixed spelling NVGaling -> NVGalign
11 years ago
Mikko Mononen
5de5c1d2a0
Improve stroke rendering
- added better logic for inner bevels
- tweaks to reduce overdraw at edges
- fixed convex shape logic
11 years ago
Andrew Corrigan
38bb65617e
reduces warnings
11 years ago