Git Product home page Git Product logo

libgtkcanvas's People

Contributors

albfan avatar alecaddd avatar esodan avatar philip-scott avatar wolfv 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

libgtkcanvas's Issues

Modify granite dependency

I would love if no hard granite dependency is added to libgtkcanvas, or this library will be elementary only.
A soft dependency, will allow to use this library in projects not targeting elementary and will spread it usage.

Add angle-snapping when rotating

I've implemented that like this:

If the object is rotated, by dragging the node, by a rotation amount (in degrees, for this example), then the actual rotation would be equal to:

rotation - rotation % 15

For example, if the input rotation is 67°, then the applied rotation would be 67 - 67 % 15 = 67 - 7 = 60.

And that works fine. However, this isn't the default behavior in 99% of the software I've used, but rather, it's freehand rotation, until you press a key (most likely Ctrl), and then the snapping is applied. And currently I don't know how to detect whether Ctrl is pressed or not, so I can't finish this feature on my own (if I figure it out, I will send in a PR).

Convert classes to interfaces

Currently all implementations are classes, but this will be a problem for external implementations of Items and Shapes, so I think they should be converted to Interfaces and actual classes convert (by renaming) them to default implementations.
Example:
public interface GtkCanvas.Item : Object, Actor {
public signal void selected (Clutter.ModifierType modifiers);
(.. convert to abstract or virtual methods)
}
/* Current GtkCanvas.CanvasItem could be renamed to GtkCanvas.GcItem */

Why?

Because I'm implementing GSVGtk with objects to draw SVG images and shapes, so libgtkcanvas can add classes derived from GSVGtk ones and implementing libgtkcanvas interfaces, so it will get SVG shapes for free.

Set virtual Width and Height

Things to keep in mind:

  • What happens when you shrink a canvas past where the item was? Should we push it back?

Refactor as a Library

I propose following directory/files structure:

ROOT
meson.build
src
All library VALA files
meson.build
demo
Window.vala
meson.build
data
meson.build
gtkcanvas.pc.in

No subdirectories in SRC and all files related to the library are there.

If you Agree, I'll continue a PR ASAP.

Consider to change license to LGPL

This kind of libraries, is useful for many other type of projects, so making it LGPL will help to be adopted by open-source and proprietary software.

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.