Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Desenho.py
Commit message (Collapse)AuthorAgeFilesLines
* Selection disapear - SL #4375Gonzalo Odiard2013-01-111-5/+0
| | | | | | | | | | If there are a selection already finished, should be painted, when draw the selected area. Redraw can be triggered by events externals to what the user do, like canvas scroll due to open or close subtoolbars, or a window opened over the canvas (ObjectChooser) Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fix artifact using line tool - SL #4363Gonzalo Odiard2013-01-091-0/+3
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Improve response in brush tool - OLPC #12405Gonzalo Odiard2013-01-091-4/+19
| | | | | | | Now draw only the last part in a polygon, when is open and not filled (the brush case) instead of drawing all the polygon every time. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Use fast scaling in cairo to resize selections - SL #4208Gonzalo Odiard2012-11-141-13/+0
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fix freeform tool use with touch - part of SL#4074Gonzalo Odiard2012-10-311-2/+20
| | | | | | | To do easier show where the freeform will be closed, a circle is displayed. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Use touch events - SL #4004Gonzalo Odiard2012-10-191-6/+5
| | | | | | This patch does not solve the tools selection and freeform Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Use a similar surface to improve performanceGonzalo Odiard2012-10-021-2/+1
| | | | | | | | | | As the surface is created in draw callback, we need delay some operations until the surface is created. The undo keep is delayed until finish draw, then enable_undo() now only enable a flag, and a new method keep_undo() do the real task. This patch breaks rotation and mirror, will be adressed in another patch. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Do te resize visualy in the canvasGonzalo Odiard2012-09-041-10/+30
| | | | | | | Remove the spinbuttons in the image toolbar, and handle the visual representation in the canvas Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fix rotation of selectionsGonzalo Odiard2012-09-041-6/+1
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Initial version of port to gtk3Gonzalo Odiard2012-08-101-17/+16
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fix artifacts in circle and heart shapesGonzalo Odiard2012-08-101-0/+2
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Use clipping to improve performance in the slower operationsGonzalo Odiard2012-08-101-20/+17
| | | | | | | | | The port to cairo is a lot slower (in a xo) than using the old primitives. Previously we was painting all the screen in most of the operations. This patch calculate and apply clip over most of them and add comments "TODO: clip" in the remaining. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Use the polygon method to repalce the trace codeGonzalo Odiard2012-08-101-8/+68
| | | | | | | | | Trace code was used by brush, eraser and rainbow tools. Was replaced in the brush and eraser tools, due to artifacts when the alpha is not 1.0 The rainbow tools continue using the old code (renamed to _old_trace) Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Improve the freeform close adding a point to the first positionGonzalo Odiard2012-08-101-0/+1
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Pylint fixesGonzalo Odiard2012-08-101-34/+8
| | | | | | Mostly remove unused code, and replacing window by get_window() Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Remove temporary loggingGonzalo Odiard2012-08-101-6/+0
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Text tool ported to cairoGonzalo Odiard2012-08-101-13/+24
| | | | | | | This patch reorganize a little the text management code, to do the font_properties private to Area. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Resize of selections use cairoGonzalo Odiard2012-08-101-62/+6
| | | | Singled-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Implement undo/redo using cairoGonzalo Odiard2012-08-101-3/+3
| | | | | | | | | | | The stored images are pixbuf instead of pixmaps now. Created two methods _surface_to_pixbuf and _pixbuf_to_context to copy from/to pixtuf/surfaces because the code was used in a few places. enableUndo was renamed to enable_undo too and unneded parameters removed. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Implement stamp tool with cairoGonzalo Odiard2012-08-101-3/+9
| | | | Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Pep8 fixesGonzalo Odiard2012-08-101-2/+2
|
* Initial phase of clipboard operations ported to cairoGonzalo Odiard2012-08-101-23/+27
| | | | | | | | | | | | | | | | | Copy, paste and move operations are implemented. NOTES: * Change size of selection is not implemented in this patch. * A refactoring was done to do the code easier to understand. Previously, the Area.selmove was used to check if a selection is in progress. Now only to check if a area is being moved. A selection is detected using Area.is_selected(). The propery selmove now is private _selmove. The selected area now should be obtained using Area.get_selection_bounds(), and not using Area.orig_x, Area.orig_y and the selection size. This properties should be removed after finish refactoring. The property Area.sel_get_out was removed. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* First stage of port of Paint to cairoGonzalo Odiard2012-08-101-353/+239
| | | | | | | | | | | | | | | | | | | | | | | | | Brushes and shapes are working. NOTES: * The pixmaps used as canvas has been replaced by ImageSurface and cairo context. * All the gc with tool properties were removed. * The variables needed by the freeform and rainbow were moved from Area to Desenha * The freeform code was simplified. * The heart is draw using cairo curves and is a little different than before. * I am using cairo_stroke_color and cairo_fill_color values in the tool dict to enable compatibility while the port is done, later will be unified. I am setting this color with a fixed alpha of 0.3 to display artifacts if we want enable alpha in the future. It's only for test at this stage. * The code used to display the polygons (triangle, trapezoid, arrow, paralellogram, star, polygon_regular) was simplified calling a method _draw_polygon witha array of points. PENDING: * All the clipboard operations. * All the efects. * Text * Bucket * Stamps
* Implement pick tool - SL #3107Gonzalo Odiard2012-04-181-8/+8
| | | | | | | This patch include a little refactoring to do more understable the code. The janela variable was renamed to the more ocmmon activity name. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
* Add a timer for resize that prevents repetitive operation - OLPC #10770Gonzalo Odiard2011-07-051-3/+33
| | | | | Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Gonzalo Odiard <gonzalo@laptop.org>
* Fixes to undo/redoGonzalo Odiard2011-06-241-9/+5
| | | | | Signed-by-off: Manuel Quiñones <manuq@laptop.org> Signed-by-off: Gonzalo Odiard <gonzalo@laptop.org>
* Center image in the canvas - SL #2896Gonzalo Odiard2011-06-161-2/+2
| | | | | | Signed-off-by: manuel quiñones <manuel.por.aca@gmail.com> Acked-by: Gonzalo Odiard <gonzalo@laptop.org>
* Implementation of Stamp functionalityGonzalo Odiard2011-05-031-3/+24
| | | | | | | | | The user can select a part of the image to use it like a stamp. When the stamp is selected, can change the size, and use it to draw. Signed-of: manuel quiñones <manuel.por.aca@gmail.com> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
* Implement a custom widget to show in the toolbar the brush shape, color and sizeGonzalo Odiard2011-04-081-1/+1
|
* Move all the controls in the indiviual tool palettes to the color palettesGonzalo Odiard2011-04-051-18/+18
|
*