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.
- Opacity: The degree to which the painted mark over paints the existing image is controlled by the opacity. Opacity varies from 0 to 100% with 100% completely covering the original, and 0% being completely transparent and making no change to the image. Values can be adjusted using the slider or directly entering a number into the adjacent integer gadget.
- Scale: The size of the working brush can be scaled from 0% to 500%. So a 10 pixel brush would vary from 0 to 50 pixels. In reality the smallest allowable size is 1 pixel. Ofcourse when the brush is scaled down that small not antialiasing efects can be used, but it can still be useful for fine precision work. Again as with the opacity settings, the value can be adjusted both by slider and interger gadget.
- Mode: Select the blend mode of the paint tool. Normal, Multiply, Divide, Add etc.
- Pressure: The next five switches affect the behaviour of the paint tool when a tablet with pressure sensitivity is used.
- Size: Checking this box will enable size sensitivity. By default the size of the brush will vary from 10% of the brush size up to 100% when pressing with maximum pressure. The range of values can be varied with the popup. The minimum can legitimatly be greater than the maximum in which case the brush size becomes smaller as pressure increases. This resizing is applied in adition to the scaling set above, so giving very fine control of the brush size.
- Opacity: Checking this will enable the opacity to be varied with pressure, again in a range from 10% up to 100% of the value set with the opacity slider. The default range can again be using the popup.
- Hardness: If the brush type supports it the hardness of the edge of the brush will vary with tablet pressure. The effect is quite subtle and most noticable if the brush itself is quite hard to start with.
- Colour: When enabling colour sensitivity, the colour painted by the brush varies between the background / alternate colour at low pressure and the foreground / primary colour at full pressure. A very useful effect for creating subtle colour transitions.
- Jitter: makes the amount of jitter effect applied to the paint stroke depend on the pressure.
- Jitter: The next three switches switch on and off the amount of jitter ar randomness applied to different aspects of te brush stroke. The slider following each switch sets the strength of the effect.
- Position: Jitters the position of the brush stanmp, creates any thing from a slightly wobble to a dramatic scattering
- Pressure: Adds a random variation to the pressure, which when combined with the pressure settings can create a range of useful effects.
- Scale: Adds random variations to the scale/ size of the brush stamp
- Modulation: Create brush strokes that fade in or out over distance or vary according to periodic functions.
- Tilt: Vary the paint attrubutes with the tilt of the tablet stylus
- Size: Vary the size of the brush with the tilt angle, the brush is scaled in the X and Y direction according to tilt in those directions
- Colour: Vary the colour between the foreground and background colours. The direction of tilt doesn't matter here just the degree.
- Switch and X and Y: Swaps the X and Y axes of the tilt stylus.
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