Code Monkey home page Code Monkey logo

crossgraphics's Introduction

CrossGraphics Library

CrossGraphics aims to deliver a simple immediate mode interface for drawing graphics on a variety of platforms running .NET.

Currently the following platforms are supported:

Using the library

CrossGraphics assumes that you have partitioned your project into parts that will be cross-platform and parts that are platform-specific.

In your cross-platform code

Add a reference to the cross-platform file Graphics.cs. This will expose the interface CrossGraphics.IGraphics that is the recipient of all drawing commands.

You should now code your objects to be able to draw themselves by being passed and IGraphics object.

Drawing commands include:

  • Rectangles using FillRect and DrawRect
  • Rounded Rectangles using FillRoundedRect and DrawRoundedRect
  • Ovals using FillOval and DrawOval
  • Lines using DrawLine and the option BeginLine and EndLine primitives
  • Images using DrawImage
  • Text using DrawString and the associated font functions

In your platform-specific code

Add a reference to the appropriate platform-specific implementation of IGraphics. Create the appropriate graphics context and pass it to your objects that expect an IGraphics object.

License

The code is copyright Frank A. Krueger and is released under the MIT license.

crossgraphics's People

Contributors

praeclarum avatar

Watchers

James Cloos avatar

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.