AltSoftLab's picture

AltSketch Vector Graphics Library

Follow us on twitter twitter.com/AltSoftLab to keep abreast of developments!

AltSketch is a pure C# CLS compliant 100% managed, without unsafe blocks Software Vector Graphics Library for Games, Scientific Applications & other uses of Computer Graphics. All core functionality collected in one small library AltSketch.dll for Microsoft .NET Framework or Mono. It depends only on System, System.Data & System.Xml assemblies (.NET Framework 2.0).

AltSketch includes AltNETType - pure C# CLS compliant port of wonderful font rendering library Freetype. AltNETType presented as a subsystem of AltSketch in Alt.NETType namespace. AltSketch contains highlevel font realization working with many fontfamilies (system fonts, custom font files). But also FreeType like interface is available throw Alt.NETType namespace of AltSketch library.

AltSketch includes AltNETImage. It is a subsystem of AltSketch & was designed to be a simple way to load / save a several image format file streams into a Alt.Sketch.Bitmap object. AltNETImage is written entirely in .NET C# code. It does not use any OS-depended or other interoperability code, and it does not use any unsafe code blocks.

Also AltSketch includes Extensions - useful solutions that has been ported to AltSketch. We are aiming at the creation of a multi-platform, lightweight and at the same time multifunctional product with a lot of ready solutions based on it. On the one hand, it is a demonstration of AltSketch’s functionality and ways of its use, on the other hand it gives you the possibility of accomplishing your tasks easier and more quickly.

AltSketch is free for no commercial use.

AltSketch Vector Text Single Path Transformer
AltSketch Vector Text Single Path Transformer

AltSketch Vector Text Double Path Transformer
AltSketch Vector Text Double Path Transformer

AltSketch Boolean Operations (CombinedGeometry)
AltSketch Boolean Operations (CombinedGeometry)

AltSketch Geometry Lens Effect SVG Transformation
AltSketch Geometry Lens Effect SVG Transformation

AltSketch QuickFont
AltSketch QuickFont

AltSketch NPlot Multi Plot
AltSketch NPlot Multi Plot

AltSketch Gwen Skinned TextBox
AltSketch Gwen Skinned TextBox

AltSketch Outline SVG
AltSketch Outline SVG

AltSketch Clipper Geo - Circles
AltSketch Clipper Geo - Circles

AltNETType (FreeType.NET)
AltSketch Gwen Skinned TextBox

AltNETType (Outline Transformations - Fill and Contour)
AltNETType (Outline Transformations - Fill and Contour)

AltSketch Geometry Polar Transformation
AltSketch Geometry Polar Transformation


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Robmaister's picture

Did you hand-write the FreeType port or was it automated, and how does performance compare to the native FreeType?

Additionally, it would be nice to see an open sourced version of your FreeType port, or at least a non-obfuscated version.

And I very much agree with the "don't rely on System.Drawing" philosophy, libgdiplus on Mono is very finicky and has given me a lot of issues in the past. I'd say it's okay to use unsafe blocks in games to improve performance where necessary, though.

Overall, very impressive!

AltSoftLab's picture
Robmaister wrote:

Did you hand-write the FreeType port or was it automated, and how does performance compare to the native FreeType?

It was a many-many months hard work with port process line by line of code. Developed many hooks and code restructures. Any essential difference isn't noticed in performance in comparison with native FreeType.

Robmaister wrote:

Additionally, it would be nice to see an open sourced version of your FreeType port, or at least a non-obfuscated version.

It's not possible now. Maybe in the future. It was a very hard work. We ported FreeType because we want to use absolutely C# text rendering engine. But we decided to create open interface to ported FreeType for those who want to migrate from Tao.FreeType (or other wrappers) to native C# FreeType implementation. AltNETType (as part of AltSketch) has no commercial license - it is already too much.

Robmaister wrote:

And I very much agree with the "don't rely on System.Drawing" philosophy, libgdiplus on Mono is very finicky and has given me a lot of issues in the past. I'd say it's okay to use unsafe blocks in games to improve performance where necessary, though.

It's a few cases when unsafe blocks give more performance compare to C# safe code. Unsafe code isn't used in AltSketch closed source assemblies. So it's possible to create assemblies versions for wide variety of platforms (Silverlight, etc): like do once, work everywere. In other words, we try to minimize OS-native or machine code external dependencies.

Robmaister wrote:

Overall, very impressive!

Thanks! It's just a began :)

Robmaister's picture

Nice, I've heard people ask for a fully managed C# port of FreeType for a while, I myself hand-wrote a nice wrapper for FreeType called SharpFont instead of using Tao.FreeType to get font rendering in my game (GDI+ didn't give me enough information to pack glyphs into a glyph sheet, Tao.FreeType didn't expose the full API). Glad to see someone's finally done it.

In my case, wrapping around the native FreeType is fine since I'm only targeting desktop OSs - Windows, Linux, OS X. Most linux users will have FreeType installed for something else and OS X ships with FreeType, so it's not restrictive for me (same with compiling with /unsafe).

The only native code we try and avoid is native code that isn't already on most users' machines.

AltSoftLab's picture
Robmaister wrote:

Nice, I've heard people ask for a fully managed C# port of FreeType for a while, I myself hand-wrote a nice wrapper for FreeType called SharpFont instead of using Tao.FreeType to get font rendering in my game (GDI+ didn't give me enough information to pack glyphs into a glyph sheet, Tao.FreeType didn't expose the full API). Glad to see someone's finally done it.

We created 3 examples of AltNETType using. They are adapted to AltNETType examples from FreeType 2 documentation (tutorials Part I & Part II).

Robmaister wrote:

In my case, wrapping around the native FreeType is fine since I'm only targeting desktop OSs - Windows, Linux, OS X. Most linux users will have FreeType installed for something else and OS X ships with FreeType, so it's not restrictive for me (same with compiling with /unsafe).

It's too hardly to distribute applications because of native code dependencies on different platforms . It is need to create platform specific versions of native libraries for each environment (FreeType, FreeImage, etc). Not everyone C# developer can do this. In some cases it's not available at all (Silverlight, Cosmos, etc.) We try to minimize such efforts.

Robmaister wrote:

The only native code we try and avoid is native code that isn't already on most users' machines.

At this moment not all FreeType like interfaces are available, because for further support we need to know which AltNETType’s functions are used directly. But we are ready to give you all necessary program interfaces. You just need to apply for it in the “Feature Requests” section of the AltSketch Forum. If you found a bug, you can report about it in the “Bug Reports” section.

AltSoftLab's picture

New AltSketch demo example demonstrates Geometry Polar Transformation

AltSketch Geometry Polar Transformation
AltSketch Geometry Polar Transformation

AltSketch Geometry Polar Transformation
AltSketch Geometry Polar Transformation

AltSoftLab's picture

AltSketch 0.81 (Silver) released!

What's new in last months:

- Image saving operations are realized (Screenshot creation creation tool added – press F12 or F11 for transparent work area only).

- Solved PNG loading internal bug (some formats previously read incorrectly & produce destroyed pixel data).

- Added new image file formats: GIF, TGA, TIFF (more image file formats support is coming soon...)

- Texture Atlas creation tool Example.

- AltQuickFont center text alignment bug fixed (native QuickFont bug). Improved & optimized loading operations for faster library initialization.

- Added different Mouse Cursors support.

Updated Integrations with the wide variety GUI-s & frameworks:
Silverlight
Windows Forms (throw System.Drawing, OpenGL, DirectX, DirectDraw​)
WPF (throw System.Windows.Media, OpenGL, DirectX, DirectDraw)
GTK (throw Gtk.Image, OpenGL)
QT: Qyoto & Qt4Dotnet​ (throw Qt.Image, OpenGL)
wxWidgets (throw wxWidgets.Image)
OpenTK / AltOpenTK
Tao.OpenGl (with Tao.FreeGlut)
SdlDotNet / AltSdlDotNet
​Tao.Sdl
SlimDX

New ported to AltSketch Extentions & Demos (look at AltSketch Project Page):
GMap.NET
HTML Renderer
PDFsharp
MigraDoc
OxyPlot
AForge.NET
Accord.NET
ZedGraph
PieChart3D
CEGUI
Miyagi