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
1
vote
0 answers

Android Skia remote surface

Hi I was researching the possibility to transport the "not rendered" rendering calls to a second screen from Android. While researching I found out that Skia is behind the Surfacefinger, and the Canvas.draw() method. So my question is now, what…
joecks
  • 4,539
  • 37
  • 48
1
vote
1 answer

Android - skia decode error for images

I have been trying to decode an image as follows: String dat = jobJect.getString("dat"); client = new DefaultHttpClient(); String url2 = url1 + dat; request = new HttpGet(url2); …
random
  • 10,238
  • 8
  • 57
  • 101
1
vote
0 answers

Unable to Add Text in my RN Skia Web Project using Expo

I am getting the following error when adding text to my RN Skia Web project which uses Expo Router: Uncaught Error _Image.default.resolveAssetSource is not a function Here is my setup: //text setup: const fontSize = 32; const font =…
1
vote
0 answers

How do I rotate a Path around a central point of the Path?

I have the following the code which rotates a shape in RN Skia. I am wondering how I can rotate the shape around the central point of the shape, rather than around the point in the screenshot below. import { Path, Skia, useClockValue, …
jsindos
  • 459
  • 6
  • 22
1
vote
1 answer

SkiaSharp performance worse than Processing?

Edit: The F# code has been updated such that it only uses the Silk.NET and SkiaSharp NuGet packages. It reproduces the same lower performance. In Processing, you can find a performance example demonstrating the rendering of 50,000 lines in an…
bmitc
  • 357
  • 1
  • 9
1
vote
0 answers

How to force canvaskit renderer while using service workers?

I am having trouble with my Flutter web app when I tried to publish it because it cannot be loaded on mobile devices, even if they are set up to show the computer version. @override void paint(Canvas canvas, Size size) { var center =…
JAgüero
  • 403
  • 1
  • 4
  • 14
1
vote
1 answer

SkiaSharp in Blazor for desktop app without WASM ( Blazor Hybrid? )

I want to use SkiaSharp in a Blazor desktop app ( Windows, Mac, Linux, etc. ) I know about Blazor Hybrid ( Blazor Desktop ) but I didn't find any way to integrate SkiaSharp. So basically what I want is a way to use SkiaSharp in a Blazor desktop app…
Redy
  • 56
  • 1
  • 8
1
vote
1 answer

@shopify/react-native-skia with expo

when I try to import hello world example from the the original web page, I get en error like; ERROR Invariant Violation: requireNativeComponent: "SkiaDomView" was not found in the UIManager. This error is located at: in SkiaDomView (created by…
1
vote
0 answers

Draw `MTLTexture` to `CAMetalLayer`

I am drawing stuff onto an off-screen MTLTexture. (using Skia Canvas) At a later point, I want to render this MTLTexture into a CAMetalLayer to display it on the screen. Since I was using Skia for the off-screen drawing operations, my code is quite…
mrousavy
  • 857
  • 8
  • 25
1
vote
1 answer

expo-skia: filter an image and apply color overlay

I'm trying to use expo-skia to saturate an image and then apply an rgba color overlay above it. I took the saturation matrix from the pixi sources and it works fine. I can't understand how to add a color overlay after filtering. My code: import { …
RobinBobin
  • 555
  • 7
  • 17
1
vote
1 answer

Extracting image subset (cropping) with SkiaSharp

I am trying to re-purpose an example from GitHub that deals with cropping an image with SkiaSharp. Specifically, I have a 4096x4096 sprite sheet from which I'd like to extract a sub-image (a specific sprite, if you will). To do that, I use the…
Den
  • 16,686
  • 4
  • 47
  • 87
1
vote
0 answers

Ninja failing at LLVM during Skia Bindings build

I am currently trying to compile some Rust code and am coming across an error in ninja compilation when trying to compile skia-bindings package in Rust. Checking for "C:\\Program Files\\LLVM\\bin\\clang-cl.exe" Checking for…
1
vote
0 answers

Define horizontal resolution

There is a project with .NET 6 target. It is necessary to determine horizontal resolution. I can do this via System.Drawing.Common: var bitmap = new Bitmap(1, 1); var horizontalResolution = bitmap.HorizontalResolution; But the requirement says…
Adam Shakhabov
  • 1,194
  • 2
  • 14
  • 35
1
vote
1 answer

How to draw using the SKIA C++ API on a Java Canvas object on Android?

I am experimenting with native drawing using the Java Canvas API on Android. As far as I can understand, Canvas is built as an abstraction on top of SKCanvas from the Skia graphics engine. I'm willing to pass the Canvas object obtained in the…
1
vote
0 answers

Smooth velocity scroll

I'm trying to implement a smooth slow down scroll based on the velocity of the user gesture. I'm using MR.Gestures to handle the pan gesture and obtain the velocity, then I'm running an animation loop to perform the deceleration but it's very jerky…
DanC
  • 33
  • 1
  • 6