Pure Swift CoreGraphics (or Quartz2D) implementation (Supports Linux)
pureswift / silica Goto Github PK
View Code? Open in Web Editor NEWPure Swift CoreGraphics (Quartz2D) implementation (Supports Linux)
License: MIT License
Pure Swift CoreGraphics (Quartz2D) implementation (Supports Linux)
License: MIT License
Hi. I forked this repository. I've added additional functionality that I needed. Also, I've updated dependencies repositories. So my question is: how I can contribute to this repository?
Also, is there a way to update dependencies?
Thanks in advance!
When trying to build a package that uses Sillica, there is this compile error:
error: the directory Sources/SilicaTests has an invalid name ('SilicaTests'): the name of a non-test module has a 'Tests' suffix
Silica implementation for PureSwift/Cacao#1 feature.
I'm using Silica in a swift package (vapor app). Cairo won't build… I've installed cairo etc via brew.
Any pointers much appreciated. I assume a header search paths issue of some kind?
Hey, I'm new to swift. As far as I can see I can't use the master branch of packages with the package manager (which makes sense). So I get an error because commit aa4f82a is not included.
Can you make a 1.1.2 release of the package and the dependencies?
Thanks!
(Using the latest Swift release on Ubuntu 16.04)
Hello there,
In trying to build the latest version of the library on Ubuntu 18.04 I get an error when compiling CGFont. Error is
/my/path/to/Silica/Sources/Silica/CGFont.swift:52:35: error: cannot assign value of type '_cairo_hint_metrics' to type 'FontHintMetrics'
options.hintMetrics = CAIRO_HINT_METRICS_OFF
^~~~~~~~~~~~~~~~~~~~~~
The specific part of the code is this in CGFont.swift, in the init() function:
...
let face = FontFace(fontConfigPattern: fontConfigPattern)
let options = FontOptions()
// TODO Does not compile...
options.hintMetrics = CAIRO_HINT_METRICS_OFF
...
The definition of FontOptions appears to be found in cairo.h, specifically struct _cairo_cont_options. Actually setting the hint metrics for a FontOptions appears to be defined in cairo.h, here:
cairo_font_options_set_hint_metrics (cairo_font_options_t *options,
cairo_hint_metrics_t hint_metrics);
The hint metrics type along with member CAIRO_HINT_METRICS_OFF, appears to be in the same file, here:
typedef enum _cairo_hint_metrics {
CAIRO_HINT_METRICS_DEFAULT,
CAIRO_HINT_METRICS_OFF,
CAIRO_HINT_METRICS_ON
} cairo_hint_metrics_t;
If these definitions are all here and supported by the API then why should this error occur?
Hello there,
I was trying to build the Cacao library and ran into an ambiguous reference error:
/path/to/my/checkout/Cacao/Sources/Cacao/UITableView.swift:966:12: error: ambiguous use of 'isNull'
if rect.isNull == false, rect.size.height > 0 {
^
Foundation.CGRect:14:16: note: found this candidate
public var isNull: Bool { get }
^
Silica.CGRect:15:16: note: found this candidate
public var isNull: Bool { get }
^
It appears that CGRect is already available with Swift under Linux and does not need to be reimplemented. I've not had much luck finding anything in the Swift project's commit history indicating that this is a recent change. I did find an extension for CGRect in swift's stdlib allowing access to most of the fields/methods found in the Silica project's CGRect.swift file.
Removing the CGRect type from Silica allows the Cacao project to compile however.
I've forked Silica with this change and a few others here:
https://github.com/kevinvandenbreemen/Silica
Consider leave option to switch between skia or Cairo.
Skia much easy to build from sources for different platforms then Cairo.
For example If you would like to support android in any future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.