GithubHelp home page GithubHelp logo

cairo's People

Contributors

araq avatar asheb avatar charlesending avatar def- avatar dom96 avatar enthus1ast avatar exhu avatar fowlmouth avatar jyapayne avatar ringabout avatar treeform avatar wetdesertrock 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

Watchers

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

cairo's Issues

how to use it in a window?

Browsed the examples, images are drawn from the scripts. But what should I do if I want to draw in a window?

cairo_surface_create_for_rectangle function

Please add to cairo.nim

# new since 1.10
proc cairo_surface_create_for_rectangle*(target: PSurface, x,y,w,h: float64):
    PSurface {.cdecl, importc: "cairo_surface_create_for_rectangle", libcairo.}

Windows dependency is broken

Currently cairowin32 does not compile because it can't find the 'windows' module.

I'm not sure what the plan is with the windows API wrapper, but I suppose a quick fix is to add a dependency on the 'oldwinapi' package.

(I'm not sure how advanced the nimble dependency system is, but it would be nice if the dependency was only valid when using nimble on windows)

Use destructors for automaticaly closing of resources

in order to do these are the steps that need to be taken:

  1. types and procs interfacing directly with libcairo need to keep their original names
    example type example proc

  2. The "higher level" user api of this library will get shorter names like Surface, imageSurfaceCreate.

  3. destructors will be attached to these types. it will look like this:

type
  Surface = object
    data: PSurface

`=destroy`(surface: var Surface)
`=`(dst: var Surface, src: Surface) {.error.}

These changes will break the api of this library but will allow the user to forget the closing of resources.

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.