The latest version of this document can be found at www.broad.ology.org.uk/amiga/sketchblock/painttool.html

SketchBlock 3.4 - Digital Sketching For The Amiga

Paint Tool

The paint tool allows drawing / painting into the currently active layer with smooth strokes of the mouse / tablet stylus.

Colour Picker

The paint tool is integrated with the colour picker tool. Whilst the paint tool is active you can press the CTRL key and pick a colour from any point in the sketch window.

Paint Tool Settings

When the Paint tool is active the settings for the tool can be modified via the settings panel in the Tools Window.(Shown Right)

The following attributes can be controlled.

  • Constrain: Press SHIFT when starting a stroke and the path will constrained to run along a straingt line. The number axes and rotation thereof may be set as desiered.
  • Use Texture: If a global texture is set, the enabling this switch will cause the paint tool to apply it
  • Stroke Relative: The texture coordintaes are calculated from the start of the stroke ratther than the origin of the layer
  • Progressive: If the progressive switch is enabled, then the painted mark builds up as the stylus / mouse moves back and forth during the same stroke, ie with lifting the stylus or releasing the left mouse button. For the effect to be noticable the opacity slider must be set to less than 100%. With a very low opacity and repeated strokes a very subtle gradient of colour intensity can be obtained.
  • Smooth Stroke: Smooths the stroke path by treating the tablet or mouse positions as control points on a bezier curve, thus creating smoother strokes. Most useful for faster longer strokes.
  • Hide Brush/ Outline / Solid: Whether and how to display the brush in the sketch window.
  • Paint Tool ARexx Commands

    To pass ARexx commands to the Paint tool you must use the SketchBlock ARexx command COMMANDTOOL

    SET

    ATTR/K,STEM/K

    Sets the Paint settings to the provided values. You may set individual attributes or pass many at one time using STEM. The following attributes are suported. When passing a STEM variable attributes not explicitly set are unchanged.
    PAINTMODE
    Specify the required paint mode as a case sensitive string. ie "Multiply" != "MULTIPLY"
    PRESSURESIZE
    BOOLEAN (0 or 1)
    PRESSUREOPACITY
    BOOLEAN (0 or 1)
    PRESSUREHARDNESS
    BOOLEAN (0 or 1)
    PRESSURECOLOR
    BOOLEAN (0 or 1)
    PRESSUREJITTER
    BOOLEAN (0 or 1)
    PROGRESSIVE
    BOOLEAN (0 or 1)
    OPACITY
    This sets the opacity of the paint stroke, it takes a value from 0 to 100
    SCALE
    This sets the scaling of the paint stroke, it takes a value from 0 to 500 (although the smallest resulting brush size is always 1 pixel square)
    SHOWBRUSH
    0 (Hide) 1 (Outline) or 2 (Solid)
    JITTERPOSITION
    BOOLEAN (0 or 1)
    JITTERPRESSURE
    BOOLEAN (0 or 1)
    JITTERSCALE
    BOOLEAN (0 or 1)
    JITTERPOSITIONVALUE
    Percentage Value from 0 to 500
    JITTERPRESSUREVALUE
    Percentage value from 0 to 100
    JITTERSCALEVALUE
    Percentage value from 0 to 100
    MODULATESIZE
    BOOLEAN (0 or 1)
    MODULATEALPHA
    BOOLEAN (0 or 1)
    MODULATEPRESSURE
    BOOLEAN (0 or 1)
    MODULATEJITTER
    BOOLEAN (0 or 1)
    MODULATIONLENGTH
    Length or duration of modulated stroke in pixels
    MODULATIONMODE
    Mode of modulation
    NUMBERAXES
    Number of constrain Axes
    CONSTRAINANGLE
    Angle of constrain axes
    PRESSUREOPACITYMIN
    Minimum value for opacity
    PRESSUREOPACITYMAX
    Maximum value for opacity
    PRESSURESIZEMIN
    Minimum value for size
    PRESSURESIZEMAX
    Maximum value for size
    TILTSIZE
    BOOLEAN (0 or 1)
    TILTSWITCH
    BOOLEAN (0 or 1)
    TILTSIZEMIN
    Minimum value for size
    TILTSIZEMAX
    Minimum value for size
    TILTCOLOR
    BOOLEAN (0 or 1)
    USETEXTURE
    BOOLEAN (0 or 1)
    STROKERELATIVE
    BOOLEAN (0 or 1)
    /* 2B pencil Setting  */
    ADDRESS SKETCHBLOCK
    'SETCURRENTTOOL TOOLNAME "Paint"'
    'SETCURRENTBRUSH BRUSHNAME "Pencil_Small_ABR"'
    
    P.PRESSURESIZE = 1
    P.PRESSUREOPACITY = 1
    P.PRESSURECOLOR = 0
    P.PRESSUREHARDNESS = 0
    P.PROGRESSIVE = 1
    P.OPACITY = 60
    P.SCALE = 20
    
    'COMMANDTOOL TOOLNAME "Paint" COMMAND "SET STEM P"'
    'SETCOLOR FF191919'
    
    

    GET

    ATTR/K,STEM/K

    Retrieves the current settings via a STEM variable, or individualy by specifying the with ATTR keyword, see above for attributes.
    STEM/K
    Pass the variable to which the settings will be added. The values will be added to the stem variable useing the name above with no index component. eg If the STEM var was FOO pressure size will be added as FOO.PRESSURESIZE Additional the stem variable ATTR is added so that a list of attributes may ne determined. This aides automatic creation of presets etc. STEM.ATTR.0 -- number of attributes.
    STEM.ATRR.1.<attrname_1>
    STEM.ATTR.n.<attrname_n>
    See the MakePreset.rexx script for a detailed example of usage.

    DRAW

    PRJID/K/N,LAYID/N/K,STEM/K,ARRAY/S,COORDS/M/N

    Draw stroke with the paint tool.
    PRJID/K/N
    Specify Project to draw into if not provided use active project
    LAYID/N/K
    Specify layer to draw into, if not provided use activelayer of specified project
    STEM/K
    Provide point data via a stem var (not implmented in painttool.sktl v 1.2)
    ARRAY/S
    Provide point data by an array of numbers on the command line...
    COORDS/M/N
    Triplets giveing the cooordinates X Y Pressure (%)

    The latest version of this document can be found at www.broad.ology.org.uk/amiga/sketchblock/painttool.html