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
2
votes
0 answers

How robust is SkPicture?

In Skia, if I record something into an SkPicture, is all necessary memory guaranteed to be preserved? i.e. picture_canvas = picture.beginRecording(width, height); picture_canvas->drawBitmap(*some_bitmap, 0, 0); delete…
Chris
  • 6,642
  • 7
  • 42
  • 55
2
votes
1 answer

Is there a way to obtain a serif font in Skia?

Is there a way of requesting a serif typeface instead of providing the name of a specific typeface to SKTypeface.FromFamilyName?
ikegami
  • 367,544
  • 15
  • 269
  • 518
2
votes
1 answer

How do I install React Native Skia so that I can use it with an Expo project and see it working in Expo Go?

I've been trying to start a project which will use React Native Skia to draw HTML Canvas like graphics. I've set up an Expo project and ran the following command - npx expo install @shopify/react-native-skia. When I try to open the project in Expo…
edgeshift
  • 23
  • 3
2
votes
0 answers

Custom SkSL Shader Crashes .NET MAUI Application using SKCanvasView from SkiaSharp

I am building a .NET MAUI app that's designed to run on iOS, specifically on an iPad Pro. In it I need to be be able to sample sections of an image based on a number of parameters and display that on screen, so I thought the best way to do that…
LFLumi
  • 21
  • 2
2
votes
1 answer

Using Expo with react-native-skia

Does anyone have an example project or a link to react-native-skia actually working with Expo? Do you have it working with the web?
2
votes
0 answers

React native skia application using old value of state

I've created a simple canvas drawing app using React Native and Skia, which works for the most part, but isn't saving drawing strokes correctly. It's based loosely off of these two articles, with the thought being that I could simplify the…
cbolton
  • 21
  • 1
2
votes
1 answer

How to resize image using Skia4Delphi

I can load and save image files using Skia4Delphi. Here is my code: var LImage: ISkImage; LSurface: ISkSurface; LPaint: ISkPaint; begin LImage := TSkImage.MakeFromEncodedFile('C:\IMAGE-OLD.PNG'); LPaint := TSkPaint.Create; LSurface :=…
Xel Naga
  • 826
  • 11
  • 28
2
votes
1 answer

Why create a struct of function pointers inside a class?

I was digging around in the Vulkan backend for the Skia graphics API, found here, and I don't understand a piece of code. Here's the smallest code example: struct VulkanInterface : public SkRefCnt { public: VulkanInterface(VulkanGetProc…
user1801359
  • 422
  • 1
  • 4
  • 14
2
votes
1 answer

Flutter directly run some Skia operations?

I have a widget showing an image and some dart:ui Paths. The problem is, I need some graphics operations to this combination. For example (as a simplified requirement), I need to subtract the image by the Paths, dilate it (Skia does have a dilate…
ch271828n
  • 15,854
  • 5
  • 53
  • 88
2
votes
3 answers

Add values to arc

I am trying to add values to arc and made a method for that purpose. However it looks like all of them are in one place even thought there are different coordinates given with for loop. What might be the problem? this.RangeEnd is float 200 Here is…
10101
  • 2,232
  • 3
  • 26
  • 66
2
votes
1 answer

SkiaSharp draw to window

How can I open a window and draw to it with SkiaSharp (without using winforms, wpf or anything like that)? I've tried using SFML.Net instead of SKIA but it lacks a lot of features (rounded rectangle, shadow, gradient).
lostceiling
  • 63
  • 1
  • 7
2
votes
1 answer

Skia for Kotlin multiplatform mobile

I am working on a KMM project and at the moment there is a need for quite advanced vector graphics. From my previous experience the best library to use was Skia: it is powerful, fairly easy and very fast. Now I have searched for a day on the…
2
votes
0 answers

How to setup Skia and Angle with a DirectX12 device

today I may have a more difficult question. I am hooking a program with DirectX12. The hook gives me the IDXGISwapChain3 on Present, so I can draw over it every frame. I already did some DirectX11 and 12 hooks before, but I am asking how would I…
XvXLuka222
  • 131
  • 6
2
votes
0 answers

Problems when build Skia for Android

I try to build Skia for Android, there is my configuration: ndk = "/root/workspace/ndk/android-ndk-r22/" ndk_api=22 target_os="android" target_cpu="arm" is_official_build=false is_component_build=false After building skia successfully, I get…
l1shu
  • 21
  • 2
2
votes
1 answer

Masking a path and paint in Flutter using a Custom Painter

i want to color the lines as I want,by use a drawPath to mask a drawPaint.But I find there is a black background behind the correct results like this.When I use the BlendMode.src to check the src(the line),I find there also a black background hebind…