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
5
votes
1 answer

Draw Text within DrawScope - Jetpack Compose Desktop

I want to draw Text inside a canvas to display a label for a chart. On Android, I can use the library: https://github.com/tehras/charts (For Compose: 1-alpha03) but on Desktop I can't. Thus I tried to rewrite the broken parts. But I can't get the…
2jan222
  • 1,732
  • 2
  • 16
  • 29
5
votes
5 answers

Is it possible to create a Skia Canvas element in an Avalonia application?

I am hoping to port an Electron app over to Avalonia. The app currently uses Paper.js to draw and manage interactions with complex polygons. Looking into Avalonia, I noticed it uses Skia, which seems to offer much of the same functionality as…
Matthew Goulart
  • 2,873
  • 4
  • 28
  • 63
5
votes
2 answers

How to obtain mesh from Skia path geometry?

I'm trying to figure out how to make Skia produce mesh from path geometry. I've checked SkPath::dump, SkPath::writeToMemory, SkPath::serialize, however all of them seem to output path content rather than mesh. Note: by mesh i mean triangle mesh…
user7860670
  • 35,849
  • 4
  • 58
  • 84
5
votes
1 answer

How to find PixelFormat for decoded bitmap using SkiaSharp

In System.Drawing we retrieve the PixelFormat from Image object, but SkiaSharp.SkImage does not provide API to find the PixelFormat of decoded image. Whether it has any other workaround to find the PixelFormat of decoded images and also how can we…
Parthi
  • 361
  • 6
  • 21
5
votes
0 answers

SkiaSharp SVG click element get id

let say i have svg document like this: " Is it possible to hit test…
Macko
  • 139
  • 7
5
votes
1 answer

Chrome Render Bug while resizing Table, header background stick on top of another div

I have two different panels those are resizable by dragging. All things are working fine in other browsers but in chrome somehow the background of header stick to the parent div. it seems the new rendering problem of Chrome with skia…
ashbuilds
  • 1,401
  • 16
  • 33
5
votes
1 answer

Picasso fails to decode some images: skia decode returned false

Update: It seems that this question boils down to that some images are correctly decoded, while some don't. If I convert the non-working JPEGs to pngs, they work. None of my images taken directly as JPEGs from either a Nikon D5000, a Panasonic Lumix…
Krøllebølle
  • 2,878
  • 6
  • 54
  • 79
5
votes
1 answer

Render an SVG with filter effects to PNG

I would like to render an SVG I've created to a hi-res (600 DPI) PNG. This SVG has filter effects, specifically gaussian blur. Ideally rendering could be done via the command line. I know the SVG is renderable because you can open it in…
leggers
  • 53
  • 1
  • 4
4
votes
1 answer

What is the optimal render loop in Dart 2?

I am looking for ideas regarding an optimal/minimal structure for the inner render loop in Dart 2, for a 2d game (if that part matters). Clarification / Explanation: Every framework / language has an efficient way to: 1) Deal with time. 2) Render…
Sean Vikoren
  • 1,084
  • 1
  • 13
  • 24
4
votes
2 answers

Fody Costura Does Not Embed SkiaSharp DLL

I created a solution that uses the Costura.Fody nuget package to merge referenced assemblies as embedded resources. I want this so that I can create a single exe for my application. This was working great for a while until I added a reference to…
user2481095
  • 2,024
  • 7
  • 22
  • 32
4
votes
1 answer

How to measure trailing spaces using SkiaSharp?

SkiaSharp doesn't consider the white spaces, when a text contains white spaces in prefix or suffix. It returns the text width only and ignore the white spaces. I am using the following code snippet to measure a string. SKPaint paint = new…
4
votes
1 answer

Android native crash when decoding png images on some 6.0 devices

Happens only in 6.0 devices, the stack trace is as follows. I'm scaling images down by setting BitmapFactory.Options.inSampleSize, so my code is scaling png files. What that be an issue? backtrace: #00 pc 000000000002c7d8 …
tactoth
  • 897
  • 1
  • 12
  • 24
4
votes
0 answers

How to find the equivalent pixel format in skiasharp?

In system.drawing there is a pixelformat in which we have added the pixel format while creating the BITMAP.Kindly refer the below code. Bitmap image = new Bitmap((int)width, (int)height, PixelFormat.Format1bppIndexed); Since the system.Drawing…
Mohan Selvaraj
  • 236
  • 2
  • 15
4
votes
2 answers

How to make the SKBitmap bitmap color as Transparent in SkiaSharp

In System.Drawing we will make the bitmap image color as transparent by using maketransparent method Whether SKBITMAP has any other equivalent method for making the color to transparent. Bitmap imgData = new…
Mohan Selvaraj
  • 236
  • 2
  • 15
4
votes
2 answers

SkiaSharp does not fill triangle with StrokeAndFill

I am trying to draw and fill a triangle. I referred an android - question How to draw filled triangle on android Canvas and did the following. It draws the triangle but it doesn’t fill it. How to get it filled? Also, is it possible to get it filled…
LCJ
  • 22,196
  • 67
  • 260
  • 418
1 2
3
21 22