Draw line on surfaceview using native code

951 views
Skip to first unread message

Huy Lê Vũ

unread,
Feb 7, 2017, 10:47:15 AM2/7/17
to android-ndk
Hello, i want to create a surfaceview on android (in java) and draw shape (line, rectangle, oval,...) on it using native code. Can someone give me an example or tutorial resolve that. Thank you!

Michel Braz de Morais

unread,
Feb 7, 2017, 5:59:53 PM2/7/17
to andro...@googlegroups.com

Best Regards,

Michel Braz de Morais

Systems Analyst / Developer

2017-02-07 7:49 GMT-02:00 Huy Lê Vũ <huyl...@gmail.com>:
Hello, i want to create a surfaceview on android (in java) and draw shape (line, rectangle, oval,...) on it using native code. Can someone give me an example or tutorial resolve that. Thank you!

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3bff7557-3b63-42f1-9ee4-19ebc45fa283%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Zhu

unread,
Feb 8, 2017, 10:14:48 AM2/8/17
to andro...@googlegroups.com

Huy Lê Vũ

unread,
Feb 8, 2017, 9:53:38 PM2/8/17
to android-ndk
Thank you @Michel Morais and @Joshua Zhu,  your link is what i need, but i cant compile the first repo. The second link is very useful because its belong to Google. Thank you!

Daniel Monteiro

unread,
Feb 10, 2017, 9:05:03 PM2/10/17
to android-ndk
Author of the first repo here. It was quite a surprise to see my study repo listed here.
Anyway, to build it, all you need is gradle. The wrapper will fetch the experimental plugin.

OTOH, I would actually recommend using NanoVG. In fact, I have another repo that uses it, but might be a little overwhelming for what's supposed to be a simple example: https://github.com/TheFakeMontyOnTheRun/dungeons-of-noudar
Feel free to contact me if you need further help.
Reply all
Reply to author
Forward
0 new messages