1. 05 Oct, 2010 1 commit
  2. 04 Oct, 2010 7 commits
    • Michael Natterer's avatar
      app: some draw tool cleanup · 4151d9f6
      Michael Natterer authored
      - call undraw() from draw() instead of duplicating its code
      - merge clear_items() into undraw()
      4151d9f6
    • Sven Neumann's avatar
      app/tools: introduce gimp_draw_tool_add_crosshair() · 8587e1e9
      Sven Neumann authored
      gimp_draw_tool_add_crosshair() is a convenience function that
      adds two intersecting guide lines in a stroke group.
      8587e1e9
    • Michael Natterer's avatar
      app: don't use PROJ_ROUND() for pixel-adjusting canvas item drawing · b7481132
      Michael Natterer authored
      When PROJ_ROUND()ing e.g. 3.8, it ends up at 4, then we added the 0.5
      offset to draw a nice cairo line in the middle of the pixel,
      effectively drawing a line that's meant to be at 3.8 at 4.5.  Instead,
      we now use floor(x)+0.5 now which snaps the above example to 3.5.
      
      Also, calculate arcs like we calculate rectangles (transform the arc's
      bounding box and pixel-align that, then recalculate the center), so
      arcs properly align with rectangles.
      b7481132
    • Sven Neumann's avatar
      app/tools: draw two guides for the moving sample point · 5a3dc38a
      Sven Neumann authored
      Instead of drawing two lines cropped at image borders, use two guides
      that extend all across the canvas and also put them into a stroke group.
      
      Also apply a similar fix as in the move tool and don't use -1 but
      G_MININT as the invalid sample point position.
      5a3dc38a
    • Sven Neumann's avatar
      app/tools: don't use -1 as invalid guide position · 5e0fbc66
      Sven Neumann authored
      Introduce a define for the invalid guide position that is used when
      creating a new guide and define it as G_MININT. The value of -1
      that used to be used for this caused the moving guide to disappear
      at position -1.
      5e0fbc66
    • Michael Natterer's avatar
      app: simplify creating of stroke and fill groups a lot · b6932690
      Michael Natterer authored
      - add gimp_draw_tool_push_group()/pop_group() which manage a stack
        of groups; all items automatically get added to the stack's top group
      - use push_group()/pop_group() all over the place, which saves a lot
        of code in most cases
      - return GimpCanvasGroup not GimpCanvasItem pointers from
        gimp_draw_tool_add_stroke_group() and fill_group()
      
      Unrelated:
      
      - add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
      - put rect select's round corners into the stroke group to
        avoid ugly overdrawing (the mis-alignment of arcs becomes
        very visible now however, will fix that soon)
      b6932690
    • Michael Natterer's avatar
      app: gimp_draw_tool_add_arc() pass the "filled" parameter down to the item · 64d9d767
      Michael Natterer authored
      instead of always passing FALSE.
      64d9d767
  3. 03 Oct, 2010 7 commits
  4. 02 Oct, 2010 15 commits
  5. 01 Oct, 2010 10 commits