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

Flutter - Skia strange error on text overflow parameter

Skia logs a strange error on the Text overflow parameter. When I commented out the overflow: TextOverflow.ellipsis, the error disappeared. Here's my code: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child:…
Mehrzad Mohammadi
  • 404
  • 1
  • 6
  • 18
0
votes
1 answer

What is the impact of react-native-skia on the size of the final bundle?

I am super excited about the possibilities which bring react-native-skia package. However, I haven't found any information about how it influences the production bundle size and bootstrap speed.
Kirill Novikov
  • 2,576
  • 4
  • 20
  • 33
0
votes
0 answers

How can I convert SKCanvas created from SKBitmap into SKPicture for debugging?

I'm using SkiaSharp to generate images, and it's very hard to debug the image generation code without visual trace. I discovered there's skia debugger and it can help a lot. I have SKCanvas created from SKBitmap, and I would like to get SKPicture…
Michael Kruglos
  • 1,205
  • 14
  • 26
0
votes
1 answer

Skia Sharp DrawText not considering Android accessibility settings (Font Size)

If user changes the Font Size from default to large or largest in androids accessibility settings all labels are scaled up. But drawing text with DrawText method on a canvas has no effect. Is this the expected behaviour? I thought that text which…
Saftpresse99
  • 849
  • 7
  • 16
0
votes
0 answers

Xamarin Microcharts: Is it possible to show tooltip on microchart

Is it possible to display a tooltip on click on the bars in Microchart? This feature is available in syncfusion. I am trying to see if the bars can accept touch events and display a popup on click. I don't see any relevant documentation but trying…
TheDeveloper
  • 1,127
  • 1
  • 18
  • 55
0
votes
0 answers

Color Matrix no filter to filter dynamically

I have managed to build a function to allow the user to adjust the contrast from 0 - 2, it works great. I am now looking to have a similar function to control a filter like Sepia from 0 (No filter) to 2 (max). I have found code to make the image go…
hugger
  • 426
  • 4
  • 19
0
votes
0 answers

SkiaSharp - Changing the color of overlapping lines

I'm using a path created by a set of coordinates and draw on canvas but I would like to change the color of overlapping lines. Like: if overlapping x2 => change the overlapped line color to green. if overlapping x3 => change the overlapped line…
Alex
  • 1
  • 1
0
votes
0 answers

How to Build SkiaSharp.NativeAssets.Linux.NoDependencies project?

I need SkiaSharp.NativeAssets.Linux.NoDependencies source code and for that I downloaded the source code from github.It pointed me to mono/SkiaSharp repo.Now I see multiple Solution files and I built the SkiaSharpSource.sln files locally on Windows…
coredev
  • 11
  • 3
0
votes
0 answers

How to get 'SkEncodedImageFormat' from 'SkImageGenerator'?

The following is my implementation of reading a bitmap : bool MySkia::readBitmap(std::string path, SkBitmap& dst) { sk_sp data = SkData::MakeFromFileName(path.c_str()); if (data == nullptr) { return false; } …
sodino
  • 261
  • 3
  • 5
0
votes
0 answers

Can HWUI's ShaderCache be shared across different processes?

I noticed that Vulkan generates ShaderModule from SPIRV bytecode is a very expensive operation, which will take up a lot of CPU cycles, but the overhead of this aspect in skia vulkan is extremely low, I guess this is mainly the role of ShaderCache,…
0
votes
0 answers

'Variables are not avaiable' when debugging Skia in AndroidStuio

I just tried to build Skia for Android following the Skia documentation at https://skia.org/docs/user/build/#android https://skia.org/docs/user/sample/viewer/#android Then, every step seems to succeed. But, 'Variables are not avaiable' when…
sodino
  • 261
  • 3
  • 5
0
votes
1 answer

memory assert when delete SkCanvas object

When I use "delete mCanvas" to delete a SkCanvas object, debug with VS2022, I get a memory assert "A breakpoint instruction was executed". From the stack, "skia.dll!SkCanvas::vector deleting destructor(unsigned int)" is being called. Why does…
0
votes
1 answer

Divide area into equal parts

I read the documentation from skiasharp.. I am interested in how I can divide the surface of a shape (rectangle or polygon) into equal parts. For example, divide the surface into 6 equal parts and paint those parts with two colors according to the…
oknevermind
  • 101
  • 3
  • 17
0
votes
1 answer

When using SkiaSharp SKColorFilter.CreateBlendMode is it possible to create a dashed line?

I'm using CreateBlendMode to change the color of an SVG drawing as follows: public Color TintColor; TintColor = Colors.LawnGreen; using (var paint = new SKPaint()) { paint.ColorFilter =…
0
votes
1 answer

Assign Touch event to buttons React Native Skia

Want to assign touch event to individual button (React native skia) Current code is <>