praeclarum / crossgraphics Goto Github PK
View Code? Open in Web Editor NEWCross-platform Graphics Library for .NET
Cross-platform Graphics Library for .NET
The following references are incorrect:
./trunk/README.md:10:* Silverlight, Windows Phone 7, and Windows Metro (WinRT) using [SilverlightGraphics.cs](https://github.com/praeclarum/CrossGraphics/ blob/master/SilverlightGraphics.cs)
./trunk/samples/Clock/ClockSilverlight/ClockSilverlight.csproj:75: <Compile Include="..\..\..\src\SilverlightGraphics.cs">
./trunk/samples/Clock/ClockSilverlight/ClockSilverlight.csproj:76: <Link>SilverlightGraphics.cs</Link>
./trunk/samples/Clock/ClockWP7/ClockWP7.csproj:64: <Compile Include="..\..\..\src\SilverlightGraphics.cs">
./trunk/samples/Clock/ClockWP7/ClockWP7.csproj:65: <Link>SilverlightGraphics.cs</Link>
./trunk/samples/Clock/ClockWpf/ClockWpf.csproj:65: <Compile Include="..\..\..\src\SilverlightGraphics.cs">
./trunk/samples/Clock/ClockWpf/ClockWpf.csproj:66: <Link>SilverlightGraphics.cs</Link>
I get several errors on line 379 of CoreGraphicsGraphics.cs:
CrossGraphics/src/CoreGraphicsGraphics.cs(52,52): Error CS1502: The best overloaded method match for `MonoMac.AppKit.NSImage.AsCGImage(ref System.Drawing.RectangleF, MonoMac.AppKit.NSGraphicsContext, MonoMac.Foundation.NSDictionary)' has some invalid arguments (CS1502) (ClockMac)
CrossGraphics/src/CoreGraphicsGraphics.cs(52,52): Error CS1620: Argument #1' is missing
ref' modifier (CS1620) (ClockMac)
CrossGraphics/src/CoreGraphicsGraphics.cs(32,32): Error CS1502: The best overloaded method match for `CrossGraphics.CoreGraphics.UIKitImage.UIKitImage(MonoMac.CoreGraphics.CGImage)' has some invalid arguments (CS1502) (ClockMac)
CoreGraphicsGraphics.cs(32,32): Error CS1503: Argument #1' cannot convert
object' expression to type `MonoMac.CoreGraphics.CGImage' (CS1503) (ClockMac)
In addition, I also get
CrossGraphics/src/CoreGraphicsGraphics.cs(22,22): Error CS0535: CrossGraphics.CoreGraphics.CoreGraphicsGraphics' does not implement interface member
CrossGraphics.IGraphics.Clear(CrossGraphics.Color)' (CS0535) (ClockMac)
I'll see if I can figure out how to fix these, though I'm still quite new to Mono.
This is a great library for crossplatform development. I just discovered it reading this article:
http://blog.xamarin.com/code-sharing-strategies-for-ios-mac/
I need to render my SVG buttons in Xamarin.Forms (ios/android/osx), but I cannot see the support for SVG on iOS, OSX or Android yet.
I use to create all my assets in SVG because it's the only scalable and crossplatform graphic format. This is how my buttons should look for reference:
You can download the original svg file from my google drive (click on the download button):
http://goo.gl/m7TbmM
Please add support for this. Thanks.
In the DroidGraphics implementation, the font setting has no effect and DrawString always uses whatever the Android typeface and size settings are default.
Your samples are awesome. I would also love to see an opengl sample.
I would like to integrate the basic events such as tap, drag, hold, swipe, etc on the drawn elements. This is fairly easy with WP7 since everything is a UIElement. I saw you have a AndroidCanvasTouchManager class. Do I use this to get the events working on Android? I haven't looked at IOs yet but I am guessing that Android will be the most troublesome to get working...
I love this project! It is very likely to solve a lot of our cross-platform issues.
The one problem I have is that I can't include Graphics.cs in a Visual Studio portable class library as written, since PCLs don't have access to System.Drawing. I've made changes in my personal download of the code, and recommend them to be included in your source, to increase its portability.
At this point, Graphics.cs can be included in the cross-platform library project (a PCL in my case), and GraphicsEx.cs is included in the platform-specific project along with the platform-specific implementation file.
I am willing to submit the text of my code changes, if you want.
--Christina
Have you considered an implementation for MonoMac? It would probably be quite similar to the MonoTouch one, but the functions are not quite the same.
I might be willing to contribute it, if there's any interest in having it. (But I'm new to github, and not sure quite how I would go about submitting a patch.)
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.