Code Monkey home page Code Monkey logo

crossgraphics's People

Contributors

azeno avatar gregsn avatar praeclarum avatar tebjan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crossgraphics's Issues

References to SilverlightGraphics.cs

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>

errors in MonoMac code in CoreGraphicsGraphics.cs

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 missingref' 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 convertobject' 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 memberCrossGraphics.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.

How can I render my SVG buttons in Xamarin.Forms (ios/android)?

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:
ios_app_buttons

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.

On Android - SetFont has no effect

In the DroidGraphics implementation, the font setting has no effect and DrawString always uses whatever the Android typeface and size settings are default.

OpenGl

Your samples are awesome. I would also love to see an opengl sample.

Events

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...

PCL compliant

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.

  1. Separate the Graphics.cs file into Graphics.cs and GraphicsEx.cs by putting all the static extension classes in GraphicsEx.cs, and taking them out of Graphics.cs
  2. Alter the Polygon class to use Tuple<Single, Single> instead of PointF to represent internal points.
  3. Add a Polygon.PointFs() extension to the polygon class (in GraphicsEx.cs) that converts Polygon.Points (which is now a List<Tuple<Single, Single>>) to a List and returns it.
  4. Alter the platform-specific implementation files (e.g. SvgGraphics.cs) so that calls to Polygon.Points instead call the new extension Polygon.PointFs().

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

MonoMac backend?

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.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.