Comments (12)
Note that this is a vector library, and pixel-level operations are usually not done at this level.
A possible workaround is to draw a rectangle or circle with the desired dimensions.
What is your application doing?
from openvg.
it's putting a series of function values
f(x) = y
in a coordinate system, shown as (x,y)
from openvg.
I suggest, picking the right scale for your app, and use circles to represent the points. See: https://github.com/ajstarks/openvg/blob/master/go-client/vgplot/vgplot.go for an example.
from openvg.
yes, but that's too much computation IMO
no idea, but perhaps
line (x,y,x,y) would also work, but that's already too much computation, too.
from openvg.
if you know the (x,y) coordinates, just place an appropriately sized circle.
from openvg.
yes, I understood your proposal, but as I said: too much computation to do.
It's a matter of execution speed:
There are about 10000-40000 points to draw each second.
from openvg.
With that throughput requirement you will need to pre-allocate the object and reuse using low-level OpenVG calls.
from openvg.
That's supposed to be too hard to understand to me, I just wanted to put single pixels by simple pixel(x,y) API calls.
from openvg.
There is a fork of the library that pre-allocates: https://github.com/paeryn/openvg/tree/newfonts
from openvg.
thank you, But there I also can't find a pixel(x,y) API function:
extern void Translate(VGfloat, VGfloat);
extern void Rotate(VGfloat);
extern void Shear(VGfloat, VGfloat);
extern void Scale(VGfloat, VGfloat);
extern void Text(VGfloat, VGfloat, const char *, Fontinfo, int);
extern void TextMid(VGfloat, VGfloat, const char *, Fontinfo, int);
extern void TextEnd(VGfloat, VGfloat, const char *, Fontinfo, int);
extern VGfloat TextWidth(const char *, Fontinfo, int);
extern void Cbezier(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat);
extern void Qbezier(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat);
extern void Polygon(VGfloat *, VGfloat *, VGint);
extern void Polyline(VGfloat *, VGfloat *, VGint);
extern void Rect(VGfloat, VGfloat, VGfloat, VGfloat);
extern void Line(VGfloat, VGfloat, VGfloat, VGfloat);
extern void Roundrect(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat);
extern void Ellipse(VGfloat, VGfloat, VGfloat, VGfloat);
extern void Circle(VGfloat, VGfloat, VGfloat);
extern void Arc(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat);
extern void Image(VGfloat, VGfloat, int, int, char *);
extern void Start(int, int);
extern void End();
extern void SaveEnd(char *);
extern void Background(unsigned int, unsigned int, unsigned int);
extern void BackgroundRGB(unsigned int, unsigned int, unsigned int, VGfloat);
extern void init(int *, int *);
extern void finish();
extern void setfill(VGfloat[4]);
extern void setstroke(VGfloat[4]);
extern void StrokeWidth(VGfloat);
extern void Stroke(unsigned int, unsigned int, unsigned int, VGfloat);
extern void Fill(unsigned int, unsigned int, unsigned int, VGfloat);
extern void RGBA(unsigned int, unsigned int, unsigned int, VGfloat, VGfloat[4]);
extern void RGB(unsigned int, unsigned int, unsigned int, VGfloat[4]);
extern void FillLinearGradient(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat *, int);
extern void FillRadialGradient(VGfloat, VGfloat, VGfloat, VGfloat, VGfloat, VGfloat *, int);
extern void ClipRect(VGint x, VGint y, VGint w, VGint h);
extern void ClipEnd();
extern Fontinfo loadfont(const int *, const int *, const unsigned char *, const int *, const int *, const int *,
const short *, int, int, int);
extern void unloadfont(Fontinfo);
extern void makeimage(VGfloat, VGfloat, int, int, VGubyte *);
extern void saveterm();
extern void restoreterm();
extern void rawterm();
from openvg.
As I said, substitute pixel(x,y), with Circle(x,y,size), where size is appropriately scaled to your canvas.
you could also use a Line(x, y, x+(unit), y) where unit the the appropriate size.
You will have to determine if the throughput is sufficient for your app.
from openvg.
yes, thank you, but I assumed it was easier to have a dedicated Pixel(x,y) or Dot(x,y) API function nevertheless
(Pixel size by StrokeWidth() size )
from openvg.
Related Issues (20)
- Performance optimizations HOT 1
- Move scaling origin point ? HOT 1
- followed the instructions for shapedemo
- How do I print a text in front of a video that is played in omxplayer? HOT 2
- Golang make failed HOT 3
- * Failed to add service - already in use? When openGL driver is enabled. HOT 2
- Degree sign doesn't get rendered HOT 6
- Segfault error when drawing emoji HOT 1
- [Suggestion] Changing CGO flags on Raspbian Stretch HOT 1
- OpenVG Crash with recent firmwares... HOT 7
- PI4 support HOT 9
- Inconsistency on Circle/CircleOutline third parameter HOT 1
- Python version?
- Multiple instances one over other
- Screen recording?
- How to rotate an image, with specific rotation
- End() fails after a finish() and a init(). I'm trying to go back and forth from and to the raw terminal
- Animation HOT 1
- How to paint a circle HOT 10
- ttf-dejavu-core No more for RPi.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openvg.