1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 18:22:25 -05:00

A few documentation changes.

This commit is contained in:
Merlijn Wajer 2010-09-03 23:22:31 +02:00
parent 1d6aa46735
commit 9cdd005cc2
3 changed files with 21 additions and 2 deletions

View File

@ -12,4 +12,5 @@ default (Pascal) engine.
scriptref/mouseandkeyboard.rst scriptref/mouseandkeyboard.rst
scriptref/colourfinding.rst scriptref/colourfinding.rst
scriptref/colourconverting.rst
scriptref/files.rst scriptref/files.rst

View File

@ -0,0 +1,7 @@
.. _scriptref_colourconv:
Colour Conversions
==================

View File

@ -10,15 +10,26 @@ Finding colours on the screen is quite simple. Simba offers methods like
These methods are usually composed out of several (but not always all) These methods are usually composed out of several (but not always all)
components: components:
* The colour to search for. * The colour to search for. This is an RGB color.
* An area to search in, defined by *x1*, *y1*, *x2*, *y2*. * An area to search in, defined by *x1*, *y1*, *x2*, *y2*.
If any of coordinates are outside the clients bounds; two things can
happen depending on your settings:
- Simba throws an Exception.
- Simba will resize the bounds to fit the client without notifying
you.
* Tolerance applied to the colour matching. With a maximum tolerance all * Tolerance applied to the colour matching. With a maximum tolerance all
colours are matched. colours are matched.
* Spiral. A spiral defines a point where the search will start from. * Spiral. A spiral defines a point where the search will start from.
This is particulary useful if you want the first result near specific This is particulary useful if you want the first result near specific
coordinates. coordinates.
* AreaSize. The size the box of colours should be. Usually this is not * AreaSize. The size the box of colours should be. Usually this is not
adjustable. adjustable.
* A single point in *x*, *y* can be returned, or a set or points called * A single point in *x*, *y* can be returned, or a set or points called
a *TPointArray*. a *TPointArray*.
@ -45,7 +56,7 @@ SimilarColors
function SimilarColors(C1, C2, Tolerance: Integer): Boolean; function SimilarColors(C1, C2, Tolerance: Integer): Boolean;
SimilarColors returns true if the two passed colours are *similar* given the SimilarColors returns true if the two passed colours are *similar* given the
passed tolerance. passed *Tolerance*.
GetColor GetColor
~~~~~~~~ ~~~~~~~~