- Make SKFont glyph-only
- hide the SKFont members that take strings/bytes
- hide the overloads that return arrays (promote the use of the "out span")
- expose string/byte members on SKPaint, and only expose the returning array (for consistency)
- use a single instance of SKFont for SKTypeface glyph members
- Add glyph-based MeasureText
* Improve the Vulkan APIs
- removed the context argument as this is unused as well as an older C/C++ feature
- added a SharpVk version of the GetProc property.
* Removed the context argument (this is more an older C/C++ feature/requirement)
* Expose the WebGL APIs
* Improve the GRGlInterface and GPU delegates
- removing the object context for the GPU construction
- obsoleted GRGlGetProcDelegate in favour of the better named GRGlGetProcedureAddressDelegate
- renamed GRVkGetProcDelegate to GRVkGetProcedureAddressDelegate
- use "ProcedureAddress" instead of "Proc" to show that it is the "address" not the actual procedure
- reworked the GRGlInterface
- use the new non-context delegates
- use better naming: Create*
- adding WebGL
- created a SharpVk-specific delegate GRSharpVkGetProcedureAddressDelegate
- use actual types instead of IntPtr
* Reduce the using obsolete warnings
- still a few left, mainly the colorspace and text blob
* Switch the way GRGlInterface.Create() works
- first try OpenGL as that is actually what is expected
- don't explode on an error, return null, like the rest
* Update API usages
Google deleted `DrawTextOnPath` so this PR adds it back along with other text-related APIs.
- Added an overload for `SKCanvas.DrawTextOnPath` that disables glyph warping
- Wrapped the `ArrayPool<T>.Shared` logic into a disposable util method
- Renamed `SKFont.GetPath` to `SKFont.GetTextPath` so that it makes more sense
- Added `SKFont.GetTextPathOnPath` to get the text path, but following another path instance (warps glyphs)
- Removed/obsoleted the non-glyph overloads for `SKTextBlobBuilder.Add*Run`
- Added a set of `SKTextBlob.Create` overloads that are used to make "string" runs
- A few other small changes to make the API better
- Fixes#1183
* Correct company name
* Fix targets file
* Hide native files from project tree
* Add benchmark project
* Add a feature to skip the object registration
- ISKSkipObjectRegistration
- objects implementing this interface will not be registered in the global dictionary
- major perf boos (2.84x) due to not having to look up in a dictionary
- use direct constructor instead of object factory
* Throw an exception in "debug" builds
Several iterations of development to come to this:
* [UWP] Fix the ARM build and add ARM64
* [Win32] GDI is optional - and we don't want it
* Update harfbuzz to v2.6.2
* Use Docker
* Use a later version of the linux tools
* Use VS 2019
* Use Xcode 11
* Go all in with MSVC 14.2
* Disable the Tizen builds for now
* Add support for manually specifying VS (This can be done in a few ways, but the common way would be: --vsinstall='C:\PF\MVS\XXX\YYY')
* Update OpenJDK and Tizen Studio
* Using C++ 17
* Also added a THROW_ON_TEST_FAILURE env var to allow previews to be put out when tests are still failing
* Support basic text alignment
* Implement breakText in native code.
* Expose a generic, writable span for the pixels
* Fixes#1240
* "Cache" the info object in size so we don' have to hop the interop.
* Raw pixels depend on the CPU endianness
* Rework the assembly fixtures
* Fix concurrency issue with handle registration
* Save several ms and useless allocations
* Make sure to correctly own objects
* Native objects may be disposed at any time
* Keep the bitmap alive when just using the pixmap
* Cache the "static" font styles
A few changes and improvements:
- add some helper members
- improved the SKBitmap.CopyTo and related members
- added Encode(...) to SKBitmap
- added Encode(...) with a .NET Stream to SKBitmap, SKImage and SKPixmap
- start the move from SKEncoding to SKTextEncoding
- added more tests
- generator now has a validator for ensuring all declarations have implementations
- added equality members to all structs
Bugs Fixed
- Bitmaps copied with SKBitmap.Copy sometimes have incorrect colors
- The GC would sometimes collect a stream that was being used by a PDF document
When the paint encoding is anything but GlyphId, the underlying allocation fails. This results in not only strange behaviour, but also invalid data. The run buffer is given a size, but nothing was allocated. This does 2 things:
- if a buffer is null, override the size
- if the encoding is not glyph, then change it temporarily
When the paint encoding is anything but GlyphId, the underlying allocation fails. This results in not only strange behaviour, but also invalid data. The run buffer is given a size, but nothing was allocated. This does 2 things:
- if a buffer is null, override the size
- if the encoding is not glyph, then change it temporarily
* Make more members readonly (the generator now makes the equality members readonly)
* split the SKMatrix file into SKMatrix44, SKRotationScaleMatrix, SK3dView
* split the SKColorSpace structs/classes into a separate file
* reworked/renamed all the poorly designed SKMatrix (and related) members to be actually useful
* Make sure the obsolete items are invisible
* Make sure everything implements IEquatable<T>
* Update docs and changelogs
* ISKGLViewController is public
* Generator
- getters readonly
- implement IEquatable
* Improve a few parts of the managed API
- mark obsolete members as invisible to the editor
- make struct getters readonly
- implement struct equality/hashcodes
- SKColor calculations use the SKColorF implementations
- some whitespace fixes to conform to styles
- split SKPMColor out into a new file
* Adding SKColorF
* Improve the generator's sort
* Add SKColorF for SKPixmap
* Add the SKShader overloads and add some ToShader members
* Add some test for the SKColorF shaders
* Adding GTK extension methods
* Add initial implementation for Xamarin.Forms GTK
* Better exceptions
* GTK v2 does not build on Windows CI
This is because of mono not being installed. I could install it, but typically
this is not available on normal dev boxes. So, to make things easier, just
build on mac and linux.
* Upgraded a good few things
- multitargeting for netstandard1.3, netstandard2.0, netcoreapp3.0 and net45
- iOS, tvOS, macOS, watchOS now builds on non-macOS (not embedded binaries)
- removed empty assembly infos
- using Directory.Build.* to clean up a few things
- improved the msbuild tasks to properly skip
* Add the targets file to the nuget
* Let all the tests run before failing the build
* Pack and validate in one go
* Update the samples to use the new projects
* Use VS 2017 for native builds for now
* Update Dockerfiles
* removed references from Views.WPF to OpenTK #1029 (#1078)
* Install the type redirector
* Update depot_tools
* Don't do any signing for macOS
Co-authored-by: Tyson Williams <34664007+bender2k14@users.noreply.github.com>
When decoding from SKData, it is not immediate. Rather, the data is passed to
a lazy image that is decoded when the pixels are actually needed. Thus,
passing fixed the byte[] array will result in invalid images if the array
is moved in memory or changed later on. So, we create a copy.
The other cases where the codec was use to construct a bitmap first are also
wrong. SKBitmap constructs differently to SKImage, and since SKImage is just
going to create a copy anyway, just copy the encoded data once, and pass the
data to SKImage. This way, we are all in with SKImage, and we get the expected
results.
* PRs should use a custom prerelease label
* Update some docs
* Release the mouse when the button is released
We must not require that the Handled == true because in many
cases it is not an action that is really handled. Especially if the
mouse is captured - nobody else is receiving events.
* Switch to Clang for Win32
* Make sure to first dispose the native instance
In some cases, the native instance has callbacks into the managed world. This can be seen with the documents, they have a flush callback which requires that the managed objects all still exist. This is a valid situation where some object owns other managed objects. It is invalid to have some child object reference the parent object as there is no way of informing the child that it has no parent.