1. 16 Oct, 2021 1 commit
    • ROOL's avatar
      Fix colour issue painting with a brush at reduced opacity · a85cd3fe
      ROOL authored
      Detail:
        Certain colours on a 256-colour sprite were appearing wrong when brush painting at
        reduced opacity. For example, the grey colour 208 appeared blueish. This was caused by
        a sign propagation problem in colours_entry_from_gcol().
      a85cd3fe
  2. 30 Aug, 2021 1 commit
    • ROOL's avatar
      Improvement to zoom functionality · 84b0835d
      ROOL authored
      Detail:
        Previously, when using Ctrl + scrollwheel to zoom out it's possible for the window to
        shrink and no longer lie under the mouse, meaning you have to keep chasing it around
        the screen.
        The code now attempts to keep the same pixel under the mouse pointer first with the
        scroll bars and then by moving the window if that's insufficient, but it avoids
        moving window furniture off the edges of the screen.
        Zooming initiated by keyboard, mouse wheel or magnifier keeps the window the same
        size and shape whenever possible.
        Zoom in coarse steps in the form x:1 or 1:x is now possible by Ctrl-Shift-resize.
      Admin:
        Ref https://www.riscosopen.org/forum/forums/8/topics/2146?page=21#posts-99304
        Submmission for Paint bounty.
      
      Version 2.44. Tagged as 'Paint-2_44'
      84b0835d
  3. 21 Aug, 2021 2 commits
  4. 07 Jul, 2021 1 commit
    • ROOL's avatar
      Brush tool enhancements · 562bab11
      ROOL authored
      Detail:
        A visual brush 'palette' now makes it easy to see the internal shapes or chosen sprite.
        More clear brush tool window layout.
        Adds an opacity slider.
        Tint of a sprite using the currently selected colour using a ColourTrans transfer
        function.
        Use alpha channel sprite as the brush sprite.
        Fix to colours_entry() in Colours.c for 16M colour sprites.
      
        Notes -
        The non-100% opacity features are disabled if supporting modules are missing/too old.
        Translucent painting is performed into an off screen buffer, then the result merged onto
        the sprite once the mouse is idle.
      Admin:
        Submission for Paint bounty.
      
      Version 2.42. Tagged as 'Paint-2_42'
      562bab11
  5. 12 May, 2021 3 commits
    • ROOL's avatar
      Save time & space in export converters · f452764e
      ROOL authored
      Detail:
        Precalculate the source and destination pixel addresses at the top of the loop.
        Combine BGR and RGB for 16bpp sprites by means of a component swap at the output step.
        Together, saves approx 300 bytes, and lots of repeated address calculations.
        Actively reject non-RGB family sprites; Paint doesn't support these more generally.
      
      Version 2.41. Tagged as 'Paint-2_41'
      f452764e
    • ROOL's avatar
      Add export handlers for RGB sprite types · ca20b811
      ROOL authored
      Detail:
        Missing handlers for RGB (versus BGR) sprites.
        Fix for dropping of rightmost column in some 1bpp test sprites.
        Improve colour dynamic range exported for 4k/32k/64k images (no longer shifts in 0's).
      Admin:
        Submission for PNG bounty.
      ca20b811
    • ROOL's avatar
      Ensure latest support module · 470bc9cb
      ROOL authored
      470bc9cb
  6. 01 May, 2021 2 commits
  7. 21 Apr, 2021 1 commit
    • ROOL's avatar
      Add PNG and JPEG output options · 65deef03
      ROOL authored
      Detail:
        Alongside the familiar Sprite save box, there are now options to convert to PNG or JPEG too.
        Both exporters offer (simplified) sub options to determine the compression level.
        Export is disabled in the event that the supporting modules CompressJPEG or CompressPNG are missing.
        Updated interactive help messages and menus, templates for the new save as dialogues.
      Admin:
        Submission for PNG bounty.
      
      Version 2.39. Tagged as 'Paint-2_39'
      65deef03
  8. 10 Apr, 2021 1 commit
  9. 10 Aug, 2020 1 commit
    • Robert Sprowson's avatar
      Fix for NULL pointer read on drag start · 3b247281
      Robert Sprowson authored
      The call to cnp_drag_restart_dragbox() needs the window member of current_drag_op set up, but was being used before it's set.
      Since the struct is memset to 0 before use, don't bother with the static initialiser.
      
      Version 2.37. Tagged as 'Paint-2_37'
      3b247281
  10. 04 Jul, 2020 2 commits
    • Jeffrey Lee's avatar
      Adjust USBDriver scrollwheel fix · 25c1b2b6
      Jeffrey Lee authored
      Starting with USBDriver 1.30, the scrollwheel is now handled in a
      sensible manner, so there's no longer any need to ignore four out of
      every five wheel events.
      
      Version 2.36. Tagged as 'Paint-2_36'
      25c1b2b6
    • Jeffrey Lee's avatar
      Sprite compatibility report fix · ab784d97
      Jeffrey Lee authored
      As documented in PRM5A, RISC OS 3.5 doesn't support new-format sprites
      which have masks. Update the sprite info dialogue "compatibility" field
      to reflect this, reporting that the sprite is compatible with RISC OS
      3.6 instead.
      ab784d97
  11. 23 May, 2020 1 commit
    • Robert Sprowson's avatar
      Add choices dialogue, don't set Paint$Options · 5ddfba1a
      Robert Sprowson authored
      Messages/Templates: Extra interactive help, new menu templates, new choices dialogue.
      PaintChoice.c/h: New source file to handle the choices dialogue, also added to Makefile.
      
      Main.c/h: Transfer ownership of initial_options to PaintChoice.c. Delete setting & parsing of Paint$Options. Export - and constify - Matches() for use elsewhere. Define MAXZOOMFACTOR and replace 999's elsewhere.
      Menus.c: Remove advanced options menu, these are now in choices.
      MenuD.h: Defines for the iconbar menu, remove advanced options menu.
      
      Version 2.35. Tagged as 'Paint-2_35'
      5ddfba1a
  12. 09 May, 2020 3 commits
    • ROOL's avatar
      Minor fixes · 420bdd39
      ROOL authored
      Detail:
        * Fix for 2 colours being editing when the palette is in artist friendly view
        * Disabled 'Rearrange user palette' option by default to keep confusion to a minimum
        * Remove ^P shortcut for 'Edit palette' which could cause a submenu error in some situations
      Admin:
        Submission for Paint bounty.
      
      Version 2.34. Tagged as 'Paint-2_34'
      420bdd39
    • ROOL's avatar
      Add wrap option to move sprite tool · b1f2d2db
      ROOL authored
      Detail:
        Implements a wrap option to the 'Move Sprite' tool, enabled via a check box.
        Code sharing with the camera/scissor tool via copy_to_temporary_sprite() and delete_temporary_sprite().
      Admin:
        Submission for the Paint bounty.
      
      Version 2.33. Tagged as 'Paint-2_33'
      b1f2d2db
    • ROOL's avatar
      Fix for mask errors with camera/scissor tool · 1cf50826
      ROOL authored
      Detail:
        Longstanding bug where use of the camera or scissor tool in Export mode with 'new' 1bpp mask sprites didn't work. Change to use SpriteExtend's scaled mask op.
        Ref: https://www.riscosopen.org/tracker/tickets/481
      Admin:
        Submission for Paint bounty.
      1cf50826
  13. 06 Apr, 2020 1 commit
  14. 29 Feb, 2020 1 commit
    • Robert Sprowson's avatar
      Fix loading palettes to all new & 256 colour old sprites · 182c9f8d
      Robert Sprowson authored
      A check (marked DF-300) rejected any attempt to load a palette into a new (ie. RISC OS 3.50+) style sprite. This is bogus because bbc_modevar() is perfectly happy to process a sprite mode word and return Log2bpp, which is all that was required. Confirmed on RISC OS 3.50 with
        SYS"OS_ReadModeVariable",&202D0169,9 TO,,log2bpp
      which gives 3 for a 256 colour 180dpi sprite.
      Ref: https://www.riscosopen.org//forum/forums/4/topics/14966
      
      Second, a logic error introduced in Paint-2_26 meant that loading from a file any 256 entry palette (old or new sprite) would result in the palette being reset to the kernel default. This is because there are 2 callers of menus_set_palette() with non-NULL palette pointers, but only 1 wants a default palette. Signal this case by passing -256 entries.
      
      Version 2.31. Tagged as 'Paint-2_31'
      182c9f8d
  15. 28 Dec, 2019 1 commit
    • ROOL's avatar
      Messages update · bdc9c4ae
      ROOL authored
      Detail:
        Move the menu entry tokens out of the !Help messages section so they don't get tokenised.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.30. Not tagged
      bdc9c4ae
  16. 17 Dec, 2019 6 commits
    • ROOL's avatar
      Improve reciprocity of zooming · 8b3c9626
      ROOL authored
      Detail:
        Previously a small (eg. 100x100) sprite being
        * zoomed in until it fills the screen
        * zoom 1:1
        * zoom in again
        would lead to a large black border in width as the sprite grew, but not in height. Now ensures the width is clamped to the minimum sprite width.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.30. Tagged as 'Paint-2_30'
      8b3c9626
    • ROOL's avatar
      Reduce redraws of colour panel · 9e2713db
      ROOL authored
      Detail:
        The colour panel swatch was being redrawn unnecessarily on every open window request due to not knowing whether the furniture icons had changed size. Now, only recalculate the sizes and force a redraw on a mode change event, this eliminates the flicker when moving the sprite window around.
      Admin:
        Submission for the Paint bounty.
      9e2713db
    • ROOL's avatar
      Fix for left edge adjustment · ea656225
      ROOL authored
      Detail:
        Edge Adjustment of the left edge on Adjust size was broken due to copy/paste error.
      Admin:
        Submission for the Paint bounty.
      ea656225
    • ROOL's avatar
      Treat 'New sprite' as dialogue window · c8a3984c
      ROOL authored
      Detail:
        Now that there a popup menus on the create sprite window, it can't be used as a menu dialogue (because the Wimp only allows one window) from a submenu arrow. Change the menu entry to add an ellipsis and open it as a plain dialogue window.
      Admin:
        Submission for the Paint bounty.
      c8a3984c
    • ROOL's avatar
      Open popup menus in Style Guide approved place · 33abefef
      ROOL authored
      Detail:
        In the create sprite dialogue the menus for colour/palette didn't open in the right place. Compute the offset as the Style Guide recommends.
      Admin:
        Submission for the Paint bounty.
      33abefef
    • ROOL's avatar
      Promote width variable · 6ac43b06
      ROOL authored
      Detail:
        Promoted the colour panel variables used to store dimensions based off the window furniture sizes to use ints instead of chars as they could, at least theoretically, exceed 255 OS units on a custom desktop.
      Admin:
        Submission for the Paint bounty.
      6ac43b06
  17. 14 Dec, 2019 1 commit
    • ROOL's avatar
      Fix for camera and scissor tool in 'export' mode · 05b310f2
      ROOL authored
      Detail:
        * If the source sprite has an old-style bit mask, solid pixels in the exported sprite's mask may have a different value to the source sprite's. For example 0xFF -> 0xFC.
        * The OS seems to render such intermediate mask values inconsistently.
        Applicable GCOL commands have now replaced with OS_SetColour calls (taken from another fix elsewhere in the code that dates back to Acorn).
      Admin:
        See also https://www.riscosopen.org/forum/forums/4/topics/14698
        Submission for the Paint bounty.
      
      Version 2.29. Tagged as 'Paint-2_29'
      05b310f2
  18. 26 Sep, 2019 2 commits
    • ROOL's avatar
      Fix to artist friendly remapping · e137ee5d
      ROOL authored
      Detail:
        Remapping would never occur if the confirmation box was disabled.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.28. Not tagged
      e137ee5d
    • ROOL's avatar
      Colour handling fixes · b886fe56
      ROOL authored
      Detail:
        * Menus rearranged so "Advanced" is renamed "Palette options"; "Extra click for input focus" moved to the Paint menu.
        * The "Highlight background colour" menu option has been removed to simplify the interface.
        * To address all the differences of opinion around the artist-friendly palette arrangement, the default behaviour is to not show the confirmation dialogue box plus a further menu option "Rearrange user palettes" (ticked by default).
          If the latter's unticked, the remapping to artist-friendly (upon Edit palette) will never take place; if it's ticked, the remapping will always take place except when the confirmation box is enabled and the user clicks Default.
        * Greyed out palette options when there's not a full/default 256-colour palette, as appropriate.
        * Help text updated to reflect these changes.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.28. Tagged as 'Paint-2_28'
      b886fe56
  19. 22 Sep, 2019 1 commit
    • ROOL's avatar
      Zoom resize, focus, and keyboard shortcuts · 6a84fc4e
      ROOL authored
      Detail:
        * Sprite editor windows gain input focus on first click (there's an option to disable this behaviour too)
        * Zoom with Ctrl+resize window (in addition to Ctrl+Scrollwheel already implemented)
        * Key shortcuts in Sprite editor windows
      Admin:
        Submission for the Paint bounty.
      
      Version 2.27. Tagged as 'Paint-2_27'
      6a84fc4e
  20. 25 Aug, 2019 1 commit
    • ROOL's avatar
      Colour handling enhancements · 18f461a5
      ROOL authored
      Detail:
        * Artist friendly colour ordering of 256 colour palette, and option to reorder pixel data for the remapped palette
        * Full 256 colour sprites can be created (as well as 64/16 entry VIDC compatible ones)
        * Colour indicator swatch in the bottom left corner of the sprite window
        * Adjust click on colours to paint with background colour
        * Shift-select as a shortcut to Paint > Select colour
        * Shift-adjust ditto for background colour
      Admin:
        Submission for the Paint bounty.
      
      Version 2.26. Tagged as 'Paint-2_26'
      18f461a5
  21. 17 Aug, 2019 1 commit
    • ROOL's avatar
      Tool idle event and trace bug fixes · eff0967c
      ROOL authored
      Long standing disable of idle events when they are needed. Steps to recreate:
      * Create a sprite with a palette
      * Paint a little with any brush tool
      * Go to Paint > Edit palette to open the colour picker (ensuring that the menu tree, the mouse, and the colour picker are within the bounds of the sprite view being painted)
      * Collapse the menu tree and carry on painting with the brush tool
      The brush tool now only produces output on click, not drag. This is because the idle events are no longer enabled, they were lost in merely opening the picker.
      
      "oh god a sprite window's gone walkies" observed in trace during development.
      Triggered when sprwindow_delete() is called when there's only one sprite window and you close it. This is because of an earlier change which commented out
        beforeus = /*(main_sprite_window *) &*/us->sprite->windows;
      The additional addressof operation would have introduced one extra iteration to the loop that followed (with the beforeus->link variable at offset 0, it would just dereference the pointer on the first iteration). Now the case of beforeus == us is explicitly checked.
      
      Submission for the Paint bounty.
      
      Version 2.25. Tagged as 'Paint-2_25'
      eff0967c
  22. 08 Jun, 2019 1 commit
    • ROOL's avatar
      Add clipboard/cut and paste to sprite filer · 3be21b3b
      ROOL authored
      Detail:
        * Sprite filer window can now gain input focus
        * Change sprite/selection menu to add clipboard operations
        * Change 'Copy' to 'Copy as' to keep original copy with rename option
        * Add clipboard copy/paste/cut functionality
        * Add key bindings for clipboard bits
        * Remove existing drag of selection and replace with drag and drop protocol data export
        * Add drag and drop data import
      Admin:
        Submission for Clipboard Support bounty.
      
      Version 2.24. Tagged as 'Paint-2_24'
      3be21b3b
  23. 11 Aug, 2018 1 commit
    • Robert Sprowson's avatar
      Minor debug fixes · fbb7e4e0
      Robert Sprowson authored
      PSprite.c: move the trace message up before the label, so if tb is NULL there isn't a NULL pointer dereference
      guard.c: refactor assert() to not check ptr!=0 a second time
      Found by cppcheck static analysis.
      Tagged as Paint-2_23-1 since both are debug code only.
      fbb7e4e0
  24. 10 Mar, 2018 1 commit
  25. 11 Nov, 2017 1 commit
    • ROOL's avatar
      Add mousewheel zoom/scroll and auto scrolling of selected tools · 82cd0dc4
      ROOL authored
      Detail:
        The mouse wheel can now be used to
        * scroll up/down
        * +shift to scroll left/right
        * +control to zoom in/out
        on an open sprite editing window.
        The sprite editing window will auto scroll when the mouse approaches the border with
        * the move whole sprite "hand" tool
        * the copy block "camera" tool
        * the move block "scissors" tool
      Admin:
        Submission for the Paint bounty.
      
      Version 2.23. Tagged as 'Paint-2_23'
      82cd0dc4
  26. 23 Sep, 2017 1 commit
    • ROOL's avatar
      Add 4k and 64k new sprite selector · 6e3eb1c1
      ROOL authored
      Detail:
        Put in minimal support to create 4k and 64k sprites (currently, TBGR only) so that the User Guide chapter makes sense.
        Previously it was only possible to create such sprites by switching to that mode and doing a screen capture.
      Admin:
        Tested on RISC OS 4.02 (ie. without 4k & 64k support) and RISC OS 5.23 (ie. with).
      
      Version 2.22. Tagged as 'Paint-2_22'
      6e3eb1c1
  27. 20 May, 2017 1 commit
    • ROOL's avatar
      Moderate spray can density based on time not CPU speed · 205da1f5
      ROOL authored
      Detail:
        The spray tool rate was ultimately determined by the number of wimp polls per second, which on a fast CPU can be 10,000's making the spray can more of a circle drawing tool.
        Use OS_ReadMonotonicTime to moderate the spray rate, so the speed of the CPU doesn't matter.
        Default density increased to 100 to achieve roughly the same density as a StrongARM Risc PC would previously.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.21. Tagged as 'Paint-2_21'
      205da1f5