Questions tagged [skia]

Skia is a complete C++ 2D graphics library for drawing text, geometries, and images.

Skia is a key part of several shipping products, including chromium, and as such will continue to track those projects' needs and priorities. However, Skia is also a general purpose graphics engine.

Features include:

  • 3x3 matrices w/ perspective
  • antialiasing, transparency, filters
  • shaders, xfermodes, maskfilters, patheffects
  • subpixel text

Device backends for Skia currently include:

  • Raster
  • OpenGL
  • PDF
  • XPS
  • Picture (for recording and then playing back into another Canvas)

Ports include:

  • Android
  • Windows
  • Macintosh
  • Linux

More information available at

  1. http://code.google.com/p/skia/
  2. http://en.wikipedia.org/wiki/Skia_Graphics_Engine
319 questions
3
votes
1 answer

Use Skia in Clion on OSX

I want to use Skia and SDL2 in Clion on OSX. I installed SDL2 successfully and test it in a single project in Clion, it worked well. And then I followed the tutorial on Skia's official site. I compiled it and put it in my Clion project, it didn't…
Coneain
  • 198
  • 12
3
votes
0 answers

Skia - crop SKSurface to content

I'm new to Skia. I need to crop the dimension of an SKSurface to its non white/transparent content. Do I have to iterate all the pixels? Are there better and/or faster alternatives? Thanks in advance
Michele mpp Marostica
  • 2,445
  • 4
  • 29
  • 45
3
votes
0 answers

Structure of SKPictureRecorder

I am trying to use SKPictureRecorder of SkiaSharp to draw a path in the SKCanvas. The image is not saved in the disk. Please find the code below for your reference. SKPictureRecorder record = new SKPictureRecorder(); SKCanvas tempCanvas=…
Sabari
  • 94
  • 1
  • 9
3
votes
1 answer

Why does SkiaSharp.SKBitmap.Resize returns null?

The documentation says: returns the resized bitmap if the resize operation could be performed, otherwise null. That clearly doesn't help. At all. It could at least give us a enum / error code / whatever. So I downloaded the lib's source and…
Trauer
  • 1,981
  • 2
  • 18
  • 40
3
votes
1 answer

How to render SKBitmap in Windows.Forms application?

Hi I started a new project and WinForms is new for me. I have a SKBitmap object and I don't know how can I render it.
Kaan EKİN
  • 65
  • 1
  • 8
3
votes
9 answers

BitmapFactory.decodeStream always returns null and skia decoder shows decode returned false

test image here: http://images.plurk.com/tn_4134189_bf54fe8e270ce41240d534b5133884ee.gif I've tried several solutions found on the internet but there is no working solution. I'm using the following snippet code: Url imageUrl = new…
shiami
  • 7,174
  • 16
  • 53
  • 68
3
votes
2 answers

Transparent parts in Skia View

I'm trying to use SkiaSharp in Xamarin.forms to draw some polygons on top of an image. The image is downloaded from a server and than cached in background. So I would prefer not to manipulate the image itself and instead draw a new canvas and place…
Chris
  • 105
  • 1
  • 10
3
votes
1 answer

Why does Skia include a Forth interpreter?

Why does Skia include a Forth interpreter?
dharmatech
  • 8,979
  • 8
  • 42
  • 88
3
votes
0 answers

Skia Font Styles

I am using Skia to draw text on BlackBerry 10 platform. I have trouble applying Condensed or Light styles to the font. In Skia, it only has type enum for kNormal, kBold, kItalic, and kBoldItalic styles. These Styles Works Well skTypeface =…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
3
votes
0 answers

Kearning between two glyphs skia

I'm new in skia. I want to know, how to get the kerning(or advance) between two glyphs? In my project i inluded modul of skia, and in the native have JNIEXPORT jint JNICALL Java_com_example_KernMe_NativeSkia_getHelloFromNative(JNIEnv *env, …
Ihor Bykov
  • 1,843
  • 3
  • 15
  • 22
3
votes
2 answers

SKIA :: Get Text height of a text inside a canvas

I am using Skia for one of my sample program. I have a canvas and inside this I am writing text with font_size 30, this is the code snippet. string = "Test String"; SkString text(string); SkPaint paint; SkScalar…
3
votes
1 answer

SIGSEGV Android

Can you help me with this bug? It occurred on Nexus 4. It seems that it caused by some font creation code... 06-27 16:43:59.384: A/libc(22545): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 22553 (FinalizerDaemon) 06-27…
lukjar
  • 7,220
  • 2
  • 31
  • 40
3
votes
2 answers

Does Android OS 4.1 (Jelly Bean) use HWUI or SKIA?

I have read an answer related to SKIA library here in stackoverflow that Android OS 3.0 or above is using HWUI library. I wonder if Android OS 4.1 or higher uses whether SKIA graphic library or HWUI library, or it uses both. Can anyone clarify my…
user1985973
  • 181
  • 1
  • 2
  • 11
3
votes
2 answers

Android SIGSEGV on Nexus 7 in libskia near SkCanvas::drawPosText -> AutoDrawLooper::next(SkDrawFilter::Type)+96

I've recently started getting this SIGSEGV in our app and am trying to figure out the cause or a work-around. Our app is Java only, we do not use the NDK so we aren't corrupting memory ourselves. This is a stock Nexus 7 running 4.2.2 The bug is…
mwk
  • 1,959
  • 1
  • 14
  • 22
3
votes
1 answer

Native window rendering issue on Samsung Galaxy S3

I am using Skia (prebuilt) to draw in an android native window, that i get from a java surface. The code performs well on every device I could test it on, except for a Samsung Galaxy S3 (with android 4.0.4 on it). The first image is what I should…
athos
  • 1,281
  • 3
  • 14
  • 24