315 Commits

Author SHA1 Message Date
Mikko Mononen
8feae63a46 Merge pull request #343 from damiles/master
Add image flag to support GL_NEAREST rendering
2017-01-12 13:46:41 +02:00
David Millan (Damiles)
ee031a432c Use NVG_IMAGE_NEAREST to no interpolate in image 2016-12-07 12:34:29 +01:00
David Millan (Damiles)
61fb55ac19 Merge branch 'master' of https://github.com/damiles/nanovg 2016-12-07 11:15:39 +01:00
David Millan (Damiles)
dd1eff4f9e Solve bug inverted but not good solution 2016-12-07 11:01:57 +01:00
David Millan (Damiles)
e955b3829d Nearest Support for images, but there are strange bug to solve. It's Inverted 2016-12-07 10:57:45 +01:00
Mikko Mononen
cacb00b852 Merge pull request #340 from andrewcorrigan/master
suppresses all warnings reported by latest Xcode/AppleClang
2016-11-06 08:00:39 +02:00
Andrew Corrigan
1ae01af452 suppresses all warnings reported by Apple LLVM version 8.0.0 (clang-800.0.42.1) 2016-11-05 12:19:31 -04:00
Mikko Mononen
e12379653e Merge pull request #338 from olliwang/CJK
Better support for CJK characters.
2016-11-01 20:04:34 +02:00
Olli Wang
7cd8decef4 Better support for CJK characters.
Previously, the Unicode range of the CJK chractaters only includes Chinese charactaters, Japanese Kanji, and CJK Symbols and Punctuation. The range are used by traditioanl Korean as well. This commit further includes Hiragana and Katakana in Japanese, and Hangul Syllables and Hangul Jamo in Korean to make CJK support more complete.
2016-11-02 00:05:41 +08:00
Mikko Mononen
d9e8daf46f Merge pull request #333 from olliwang/font
Fixes the bug that text may not render correctly.
2016-10-25 16:08:15 +03:00
Olli Wang
c6cddc85c1 Fixes the bug that text may not render correctly.
This commit fixes the bug that text may not render correctly when glyph is not found in fallback fonts.
2016-10-25 12:08:53 +08:00
Mikko Mononen
a367dcf163 Merge pull request #331 from olliwang/CJK
Improves to display CJK characters with English words.
2016-10-20 20:37:23 +03:00
Olli Wang
ade7193423 Improves to display CJK characters with English words.
This commit improves to display CJK characters mixed with English words so there is less spaces at line breaks.
2016-10-20 17:05:54 +08:00
Mikko Mononen
84e848d1e9 Merge pull request #330 from olliwang/CJK
Fixes line breaks for CJK characters.
2016-10-19 15:23:20 +03:00
Mikko Mononen
2ed5c0e010 Merge pull request #329 from lieff/master
handle file IO error
2016-10-19 15:21:52 +03:00
Olli Wang
c64c95c727 Fixes line breaks for CJK characters.
This commit fixes weird line breaks when rendering CJK (Chinese, Japanese, Korean) characters. Each CJK character is more like a word instead of a letter. This commit fixes the logic of line breaks by introducing a new `NVG_CJK_CHAR` code point type and takes special care for formatting text including CJK characters.
2016-10-19 19:32:51 +08:00
lieff
ecb5899bcf handle file IO error 2016-10-19 14:04:44 +03:00
Mikko Mononen
3110d5fba1 Merge pull request #316 from xeekworx/master
nvgRoundedRectEx for varying corner radii
2016-09-18 19:29:05 +03:00
Xeek
2331f1ff11 Merge branch 'master' of https://github.com/memononen/nanovg 2016-09-18 11:23:25 -05:00
Xeek
d68da77299 Merge branch 'master' of https://github.com/xeekworx/nanovg
Conflicts:
	src/nanovg.h
2016-09-18 11:02:54 -05:00
Xeek
bb385e6b8f Renamed nvgRoundedRectEx to nvgRoundedRectVarying, using variables for duplicated calls to nvg__absf, renamed the radius parameters & variables to be more descriptive, changed the order of radius parameters to follow CSS order, and finally corrected the if/else style suggested by @memononen. 2016-09-18 10:56:57 -05:00
Xeek
34621d4ad2 Renamed nvgRoundedRectEx to nvgRoundedRectVarying, using variables for duplicated calls to nvg__absf, renamed the radius parameters & variables to be more descriptive, changed the order of radius parameters to follow CSS order, and finally corrected the if/else style suggested by @memononen. 2016-09-18 10:47:58 -05:00
Mikko Mononen
7859321aa8 Merge pull request #317 from olliwang/coordinate
Fixes a bug when applying `NVG_IMAGE_FLIPY`.
2016-09-18 11:12:47 +03:00
Olli Wang
85ac378792 Fixes a bug when applying NVG_IMAGE_FLIPY.
This commit fixes issue #167 that `nvgImagePattern()` does not handle coordinate well if the specified image applies the `NVG_IMAGE_FLIPY` parameter.
2016-09-18 16:08:49 +08:00
Xeek
b2d9eb251b Added nvgRoundedRectEx so that the rectangle's corners can have varying radii. nvgRoundRect changed to utilize nvgRoundedRectEx. 2016-09-17 20:00:17 -05:00
Mikko Mononen
af0c475cf9 Merge pull request #311 from dimsuz/gl2_image_handle_fix
Rename nvglImageFromHandleGL2 -> nvglImageHandleGL2
2016-09-11 18:35:12 +03:00
Dmitry Suzdalev
23128bdb58 Rename nvglImageFromHandleGL2 -> nvglImageHandleGL2
There was no nvglImageFromHandleGL2 implementation, it must have been
an error during some refactoring
2016-09-11 14:03:34 +02:00
Mikko Mononen
4f255e0daf Merge pull request #307 from olliwang/blend
Fallbacks to default composite operation when invalid one is specified.
2016-09-04 10:15:36 +03:00
Olli Wang
c03226cd2e Fallbacks to default composite operation when invalid one is specified.
This commit fixes #300 and #306 that “control may reach end of non-void function” error occurs in `glnvg_convertBlendFuncFactor()`. The function now returns `GL_INVALID_ENUM` for invalid blend factor and if that happens, `glnvg__blendCompositeOperation()` uses default source-over composite operation.
2016-09-04 11:28:01 +08:00
Mikko Mononen
189e051527 Merge pull request #303 from olliwang/freetype
Fixes the kerning value for freetype.
2016-08-23 16:39:11 +03:00
Olli Wang
39f7a369c7 Fixes the kerning value for freetype.
This commit fixes issue #302 that the kerning value returned by freetype is not converted to integer properly.
2016-08-23 10:24:32 +08:00
Mikko Mononen
c02bc9d5ed Merge pull request #301 from olliwang/font
Support fallback fonts (code refactoring for #299)
2016-08-21 20:52:23 +03:00
Olli Wang
c97444c96f Code refactoring for #299.
This commit fixes the formats as suggested in #299 and fixes stack overflow when using `freetype` backend.
2016-08-21 21:40:40 +08:00
satoren
40e999af3c Support fallback fonts 2016-08-17 00:33:48 +09:00
Mikko Mononen
71774e0afe Merge pull request #298 from olliwang/blend
Implements composite operation for blending renderings.
2016-08-11 05:42:20 +03:00
Olli Wang
09dc767e3f Updates comment for composite operation. 2016-08-11 02:39:31 +08:00
Olli Wang
9490a8c188 Updates comment again. 2016-08-11 02:10:57 +08:00
Olli Wang
ba8272c5b5 Updates comments. 2016-08-11 02:06:53 +08:00
Olli Wang
1d856c1b00 Changes the order of declaration. 2016-08-11 02:00:23 +08:00
Olli Wang
1bf25e6f67 Improves the implementation of global composite operation.
This commit updates the implmentation of global composite operation to follow the advices described at c4b865796d (r74248556)
2016-08-10 23:01:25 +08:00
Olli Wang
c4b865796d Implements composite operation for blending rendering between frames.
This commit implements the `nvgGlobalCompositeOperation()` function to support blending between frames. All operations defined in HTML5 canvas API are supported. Also, it is possible to create custom composite operation by calling `nvgBlendFunc()` or `nvgBlendFuncSeparate()` functions.
2016-08-09 16:12:08 +08:00
Mikko Mononen
25f39a60a8 Merge pull request #297 from olliwang/bgfx
Add support for bgfx
2016-08-05 16:39:12 +03:00
Olli Wang
1664a524a7 Passes the device pixel ratio parameter to renderViewport function.
This commit updates the `nvgBeginFrame()` function to forward the received `devicePixelRatio` parameter to the `renderViewport()` function so it is possible to configure the environemnt correctly when using `bgfx` backend.
2016-08-05 16:56:36 +08:00
Mikko Mononen
cc3897359a Merge pull request #295 from nhojb/master
Fixing clang compiler warnings.
2016-08-02 21:24:26 +03:00
John
1efdf2a1de Fixing clang compiler warnings. 2016-08-02 15:05:58 +01:00
Mikko Mononen
c80af94c07 Merge pull request #283 from JinShil/patch-1
Fix typo in nvgCreateFontMem() description
2016-05-17 10:14:08 +03:00
Mike
df658f97a2 Fix typo in nvgCreateFontMem description 2016-05-17 11:30:50 +09:00
Mikko Mononen
b83cf92652 Fixed use of nvglImageHandlexx in GL utils from earlier PR
- nvglImageHandle was changes to contain GL postfix, changed GL utils
to use that too
- fixed silly failure check bug in FBO demo
2016-02-01 21:41:24 +02:00
Mikko Mononen
2504509fb2 Merge pull request #261 from reFX-Mike/master
Fixed fontstash.h crashing
2016-01-29 11:38:03 +02:00
Mikko Mononen
3321379e49 Merge pull request #201 from andrewcorrigan/master
Fix for issue #172
2016-01-28 08:21:42 +02:00