~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  PaintRR by  Robert Rayment  
         Nov 2006

  Contents  

  TOP BUTTONS.
    [Zoom scroll bar]
    [DRAW MODE]
    [K], [#]
    [Undo/Redo] (10 Levels)
    [Select OFF/ON]
    [Move OFF/ON]
    [Drawing shape][Description]
    [1][2][3][4[[5][6]
    [X,Y]
    [Magnifier]
    [Color Label]
    [Color dropper]
    [Left & Right Color], [<->]
    [+]
    [Clip off/on]
    [?]
    [Cls]

  SIDE ARROW MENUS
    [File]
    [Information]
    [Tools]
    [Colors]
    [Filters] (Stepped Mode)
    [Deformers]
    [Adders]
    [Rotate]
    [Resize]
    [Text] (Hidden)
    [Print]
    [Magnifier]
    [Merge] (Watermark)
    [Sculpture]
    [Shift/Scroll]  
    [Trace]

  DRAWING TOOLS
  [PolyLines problem]
  VIEWPORT
  DRAW/ZOOM MODE
  IMAGE SIZES
  KEY OPERATIONS
  RED EYE REMOVAL
  VB5 USERS
  EXTRA FILES
  ACKNOWLEDGEMENTS

  ====================================================================
  TOP BUTTONS.

  [Default size]
  The main form can be reduced to a small size and the visisble Viewport
  scrolled and/or saved from there. But the Default size or larger is
  needed to show all the buttons.

  [Zoom scroll bar]
  This only operates in ZOOM mode, toggled from the Draw mode button.
  In Zoom mode the image can be hand scrolled and a zoomed Viewport or
  a selection saved. The whole zoomed image cannot be saved.  To zoom
  in on a point move the cross-hairs there and operate the zoom scroll
  bar. Zoom multipliers go from 0.25 to 20. The [x1] button sets back to 
  Zoom multiplier = 1. 

  [DRAW MODE]
  Toggles between DRAW & ZOOM MODE.  Most operations can only be done
  in DRAW mode.

  [K], [#]
  This kills the Undo files and fixes the current image. The label
  underneath the [K] button shows the position of the undo file, it
  changes to red when at the end of the undo list.

  [Undo/Redo] (10 Levels)
  This is implemented by saving arrays in files SAVDAT#.dat in the same
  folder as the program.  The sizes of these files depend directly on
  the image size.  For example for an image  800x600 the SAVDAT files
  are 1.83 MB.  They are deleted on exitting. In general the size of a
  SAVDAT file is Image width x height x 4 + 28 bytes.  If you want to 
  change the maximum number of Undos then the setting is in the source
  code at the beginning of Form_Initialize.

  [Select OFF/ON]
  When ON the cursor changes to a cross.  Click on the image to start,
  draw, click to end, move to locate, click to fix.  Once a selection
  is made it can be saved.  Also the Filters, Deformers, Adders, Rotate,
  Sculpture and Shift/Scroll will just act on the selection rectangle if
  present.  In addition a Merged image will make it's own select rectangle
  which can then be moved to locate.

  [Move OFF/ON]
  When a selection has been made and the Move button set to ON the cursor
  will change to a 4 cross-arrow (Size all) over the selection. A copy can
  then be moved.  To fix this copy, press the right mouse button or click
  Move to OFF to cancel.

  [Drawing shape][Description]
  This shows the currently select drawing Tool and the Tool group name.

  [1][2][3][4[[5][6]
  These buttons set the drawing pixel size from 1 to 6.

  [X,Y]
  Shows the the x,y coords as the mouse moves around the image. For a
  selection it also shows the width & height of the rectangle.

  [Magnifier]
  The Magnifier allows accurate placing of pixels as well as having a
  button to show a thumbnail of the whole picture.  The thumbnail display
  can be left on when operating the Filters, Deformers, Adders, Sculpture
  Shift/Scroll and Merge. With Merge the overlaid image is not part of the
  the main image and will not show on the thumbnail until Accepted.  
  
  [Color Label]
  Shows the color under the cursor.	
  Clicking here toggles a Color Park from which stored left & right colors
  can be retrieved (see [Left & Right Color]).
 
  [Color dropper]
  When toggled on the cursor changes to a dropper. It can be used set
  any color from the image - left button for Left Color & right for 
  Right Color.  The box to the left of the dropper shows the color at
  the cursor.

  [Left & Right Color], [<->]
  These are the drawing colors used depending whether a Left or Right
  mouse button starts a drawing. The Left & Right Colors can be swapped.
  Clicking these stores the color in a color park (see Color Label).
	
  [+]
  Toggles the cross-hairs On/Off. In DRAW mode they follow the cursor but
  in ZOOM mode they are aligned with the scroll bars.

  [Clip off/on label]
  To avoid any button being pressed whilst in the middle of a drawing
  the mouse is clipped to the Viewport. Keying F2 unclips the mouse.  
  In the IDE this can be a problem at any break points - to overcome 
  this temporarily, you can put an Exit Sub at the beginning of the
  Sub ConfineCursor on Form1.  Pressing buttons in the middle of drawings
  will then likely crash the program, so comment out the Exit Sub before
  compiling.

  [?]
  Short Help display - also F1.

  [Cls]
  This restarts the program and fills the display with the Left or
  Right colors.

  SIDE ARROW MENUS

  Note that [File],[Information] & [Tools] bring up a menu with a Back-
  arrow to get back to the main menu list.

  [File]
  This deals with opening standard VB picture files (ie bmp, jpg & gif).
  (New) allows the image size to be set. There are three types of saving
  to a file or clipboard - Whole image, Rectangular selection (if present)
  and the visible Viewport. The Clipboard viewer enables .clp files to be 
  loaded.  Images can be saved as bmp or jpg.  A Recent Files list is kept
  in PaintRR.ini. Also image files can be dropped onto PaintRR.exe. There
  is also a (Full View) button to show the whole image using all the screen.
  Note that press Any Key to cancel this.

  [Information]
  This gives information on any loaded picture and Viewport details.
  Also on this menu are three buttons to change the color scheme.
  
  [Tools]
  Shows the Drawing Tool groups. Click on any to bring up the tools
  available in each group.  Tooltips, Scroll bars with various labels
  and Angle are present on some tools. (See DRAWING TOOLS).

  [Colors]
  Set Left/Right colors. The (Replace) button changes Left for Right
  colors on the image. The UpDown Arrow button brings up a set of sliders
  for producing smooth gradient palettes - which can be sent to the screen
  by pressing the Right arrow button followed by the (SET) button.
  Default palettes are on the (0),(1),(2),(3) & (4) buttons.
  A palette can be loaded by the (..) button (these must be JASC PAL
  files) or the On Screen palette Saved by the (S) button.
  
  [Filters] (Stepped Mode)
  In common with the [Deformers] & [Adders] the Filters can act on the
  whole image or just on a selection (if present).  Also the Filters can
  be operated in continuous or Stepped mode.  The Stepped mode is intended
  for large pictures where the filter action is slow. It enables a value
  to be set on the scroll bar with no action until the (Show) button is
  pressed.  Note that some filters make use of the Right Color. The Red
  button toggles animation On/Off.  It basically runs through a set of 
  values displaying each as it goes.  The (Fix) button temporarily fixes
  the displayed image enabling multiple effects to be displayed and the
  (Reset) button goes back to the last Fixed image.  This will be the
  original image if Fix has not been used.

  [Deformers]
  Similar to Filters. The main difference is that a choice is given to use
  the Right color or not.  What this means is that either the deformed
  image will appear with the original image as background or the background
  will be a solid color.
  
  [Adders]
  Similar to Deformers but with one difference in that some Adders (those
  marked with !) use the Left & Right Colors to make a gradient.

  [Rotate]
  The whole image or just a selection can be rotated +/- 90 or 180 degrees.
  Note that in the Deformer's set there is a Rotate action for other angles.

  [Resize]
  This allows the Whole image to be resized or just the canvas. With changing
  just the canvas size the image can be centered horizontally or vertically
  or both.  Canvas reduction cannot be done.

  [Text]
  This has a large test box for typing. The Font can be selected and rotated.
  Note the info - not all Fonts can be rotated. Also once Accepted Left click
  on the image to show the text move around to locate and click again to fix.
  The Font color is the Left color. Edge coloring can be opted for - with Right
  color or an average between Left & Background color - Feint, Medium or Strong.
  Effect only shows on final image.  Hidden text produces text only slightly
  different from the image colors. This would need to be saved as a separate
  bmp file for use with image subtraction to reveal the text (see Merge). This
  is a simple watermark for bmp files.

  [Print]
  Hopefully self-explanatory.  Printing has been tested on Samsung lazer printer
  and on a networked HP Color Deskjet sucessfully.  Note that image sizes can be
  changed and moved around the page for A4 and US 8.5x11" page sizes.
  
  [Magnifier]
  This just duplicates the action of the (Magnifier) button on the main form
  (see above)

  [Merge]
  This opens up a Dialog to load in an image which is initially located at the
  top-left of the Viewport.  It can be moved by holding the Left mouse button
  down on the image and moving the mouse.  The transparency can be changed with
  the sroll bar for the whole image or it's edges. Left click the (Move ON)
  button or close the Merge form to cancel. The two images also can be subtracted 
  to show only the difference, but the transparency scrollbar may need adjusting
  for this. BMP images show the clearest hidden text.

  [Sculpture]
  This has a Dialog button (..) on the form to load an image into the display
  box. It has the Stepped/Animation/Reset/Fix buttons as mentioned before. The
  strength of the overlaid image is set by the Weight scroll bar.

  [Shift/Scroll]  
  The difference between Shift and Scroll is that Scrolling keeps the whole
  image whereas shifting loses the image from the sides, showing just the
  background color.

  [Trace]
  The effect is to place a piece of tracing paper over the Viewport. Trace has
  it's own simpler drawing tools and they operate with mouse down and can only
  be colored black.  Tracings can be saved as black & white 2 bpp bmps.  If you
  want to just trace part of a picture, make a selection first, save it and load
  in before putting Trace on.  The magnifier can be turned on in Trace mode.

  DRAWING TOOLS

  Drawing is done with 3 actions, mouse button click to start, draw, click to
  end, move to locate and lastly click to fix.  The exceptions are where more than
  one stroke is needed. For poly-lines and curvy-lines each click starts a new
  segment but to end, the click must be with the OPPOSITE button to that which 
  started the drawing then, after locating, any click to fix.  The drawing color
  is the Left or Right color depending on whether a left or right click started a
  drawing.  Some of the Tools in the Singles & FreeDraw groups, that are have a
  colored icon, use the Left & Right colors 
  Drawing is done using XOR.  This means that the drawing will not take it's final
  appearance until fixed.  The advantage over using say, a dotted line is that most
  of the intended shape is visible against different backgrounds. But if a line is
  exactly drawn over twice it will appear invisible until fixed.  This can occur
  with polylines which go back exactly over an earlier segment. 
  Note extra info for Fillers.  With Fillers the last four items act on the whole
  image unlike the other tools.  In particular for the Filler Tool, if the colors
  are changed, press the (Re-Color & re-select button) and then actually select 
  the fill pattern wanted.
  The Warper can act in 4 directions, depending which way the mouse is moving.
  Also the Tools from Smudge to Warp operate with the mouse button held down again 
  unlike the other Tools.  Other exceptions are the single Dot which places the 
  colored dot at Mouse down and cannot be moved and the Trace drawing tools.
  [PolyLines problem]
  The Double & Shaded Poly/Curvy line shapes are not perfect due to the problem of 
  coping with reversed intersections.  If the Poly/Curvy line is unacceptable then
  Undo and try again with less sharp bends.  Since it is mostly OK I've left it in.
  
  VIEWPORT

  The Viewport is that part of the image that is visible. It's maximum size depends
  on the screen resolution.  For example with 1024x768 the maximum size is 816x623.
  [See info above on (Clip)].  

  DRAW/ZOOM MODE

  Most operations occur in DRAW mode. In ZOOM mode a Selection can be made and saved
  as well as the Viewport but not the whole zoomed image.  When the cross-hairs are
  on and visible, zooming will always show that part of the picture where the 
  cross-hairs meet.

  IMAGE SIZES

  The program will work with very large images but is best with images sizes under
  about 2000x2000 pixels (for an average PC 1.83 GHz). Note that Win9x system may
  fail for images > 4MB ie > about 2000x2000.

  KEY OPERATIONS

  F1 - Help
  F2 - Unclip mouse
  Arrow keys and KeyPad keys - move cursor
     + Shift - move faster for Arrow keys.
  Enter - Send Left Click
  BackSpace - Send Right Click
  Space bar - After fixing a shape, moving the
     mouse will then make a copy. Does not apply
     to Single Dot, Fillers or Smudge to Warp.
     Make sure to click to complete a shape before
     pressing Space again.
  C - Toggle Cross-hairs 
  F4,F6,F8,F12 - Change Mag factor if Magnifier ON
  T - Thumbnail if Magnifier ON

  RED EYE REMOVAL

  RedEye.jpg is included in Pictures folder. This comes from
  Johannes B at PSC CodeId=47347, which does a careful red-eye
  removal.  With PaintRR a quick removal can be done by making
  a selection rectangle over a pupil, bring up Filters and Swap
  Blue & Red or, more accurately, Vary Red.
  
  VB5 USERS
  
  The VB6 Replace function is used for Fractal bushes.  See note
  at picDRAW_MouseDown on Form1 to skip this use.

  EXTRA FILES	

  PaintRRHelp.txt
  PaintRR.exe.manifest
  PaintRR.ini (Created)
  PaintRR_Notes.txt
  SAVDAT#.dat (Created & Deleted)

  Though code is included to prevent manifest file problems if it
  still causes problems then rename or delete it.  The common problem
  is an error window when the exe file is closed.

  ACKNOWLEDGEMENTS

  PSC = planetsourcecode.com

  Special thanks to the following, for some ideas and techniques:-

  Manuel Santos (PSC CodeId=26303)
    (Some filters)
  Tanner Helland (PSC CodeId=25819),(CodeId=66955)
    (Contrast),(Real Brightness)
  Stephane Swertvaegher (PSC CodeId=28441)
    (Blinds, Mozaic & Stephane)
  Carles P V (PSC CodeId=34698),(CodeId=35317)
    (Smudge), (Sculpture), (Diagonal gradient)
    (with RVTilburg 256GIFs,87a only (CodeId=49875)  
  Scott Buckley (PSC CodeId=57027)
    (Circular ripples)
  Kamilche (PSC CodeId=29004)
    (Picture from Bytestream)
  Ron van Tilburg (PSC CodeId=50351)
    (Jpeg saving - modified)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~