Home > GSOC2015, kivy, python > Canvas to handle strokes and stroke processing.

Canvas to handle strokes and stroke processing.

During my milestone 1 period, we came up with 4 new classes for ink processing.
StrokePoint: Class with coordinates x and y. This is the native structure for the StrokeCanvas behavior.
StrokeRect: Logical Rectangle which purpose is to bound a stroke generated in the StrokeCanvas. Provides methods to:
Know if a point is contained in a rectangle.
Know if another rectangle overlap itself.
Stroke: The stroke contains a list of points. The list of points form a line. A stroke have different drawing attributes:
color → change color of Stroke.
width → change the size of the graphic line.
is_highlighter → changes the visibility.
A stroke provides:
get_bounds method to get the enclosed rectangle in which a stroke is.
StrokeCanvas:
A StrokeCanvas contains a list of strokes. A StrokeCanvas provides:
Events to access to the strokes created when they are added or removed.
A StrokeCanvas is the visual representation of a Stroke using Lines.
Event to access to the mode when this is changed.

stroke_canvas_kivyThe branch for this can be found at: https://github.com/andnovar/kivy/tree/mpl_kivy and you need the colors from here: https://github.com/andnovar/kivy/tree/colors_in_utils.py although these colors are going to change eventually for more descriptive ones.

Advertisements
Categories: GSOC2015, kivy, python Tags:
  1. November 9, 2015 at 10:21 am

    I used to be suggested this website through my cousin.
    I am not sure whether this publish is written by means of
    him as nobody else know such targeted approximately my problem.
    You are incredible! Thank you!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: