๐Ÿ“ฆ Geequlim / NanoCanvas

The Canvas writing in C++11 based on nanovg

โ˜… 83 stars โ‘‚ 13 forks ๐Ÿ‘ 83 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/Geequlim/NanoCanvas.git
HTTPS git clone https://github.com/Geequlim/NanoCanvas.git
SSH git clone git@github.com:Geequlim/NanoCanvas.git
CLI gh repo clone Geequlim/NanoCanvas
Geequlim Geequlim Merge pull request #1 from vgui/std_isnan 69425bf 6 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ doc
๐Ÿ“ screenshot
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENCE.txt
๐Ÿ“„ README.md
๐Ÿ“„ README.md

NanoCanvas {#mainpage}


NanoCanvas is the HTML5 Canvas liked antialiased vector graphics rendering library writing in C++11 based on Mikko Mononen's NanoVG .

Feartures

  • Easy to use , with HTML5 Canvas liked API
``c++ canvas.clearColor(Colors::DarkOliveGreen); //Clear canvas with color // Draw a rounded rectangle canvas.beginPath() .roundedRect(50,50,100,100,10) .fillStyle(Colors::Salmon) .fill(); // Draw styled text TextStyle textStyle; textStyle.size = 36.0f; textStyle.color = Colors::White; textStyle.face = font.face; canvas.fillStyle(textStyle) .beginPath() .fillText("Hello Canvas",30,190); %%CODEBLOCK0%%c++ NVGcontext * nvgCtx = nvgCreateGL3(NVG_ANTIALIAS | NVG_DEBUG |NVG_STENCIL_STROKES); Canvas canvas(nvgCtx,wndWidth ,wndHeight); if(canvas.valid()) { // Everything is OK } %%CODEBLOCK1%%c++ // main render loop while ( appRunning ) { canvas.begineFrame(wndWidth,wndHeight); // Draw awesome graphics here canvas.endFrame(); } ``

Why not takes NanoVG itself ?

You can use the backend renderer as your like. You have to do that by yourself. :)


For more informations

Documemtations is avaliable.