Doxygened clavier.h and brush.h

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@675 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2009-03-15 13:42:50 +00:00
parent 4d6561abed
commit 5883853be4
2 changed files with 81 additions and 0 deletions

55
brush.h
View File

@ -22,17 +22,72 @@
#ifndef __BRUSH_H_ #ifndef __BRUSH_H_
#define __BRUSH_H_ #define __BRUSH_H_
/*!
Gets the brush from the picture.
@param Debut_X left edge coordinate in the picture
@param Debut_Y upper edge coordinate in the picture
@param Fin_X right edge coordinate in the picture
@param Fin_Y bottom edge coordinate in the picture
@param effacement If 1, the area is also cleared from the picture.
*/
void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short Effacement); void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short Effacement);
/*!
Rotates the brush to the right.
*/
void Rotate_90_deg(void); void Rotate_90_deg(void);
/*!
Stretch the brush to fit the given rectangle.
*/
void Etirer_brosse(short X1, short Y1, short X2, short Y2); void Etirer_brosse(short X1, short Y1, short X2, short Y2);
/*!
Stretch the brush to fit the given rectangle.
Uses fast approximation for the preview while drawing the rectangle on screen.
*/
void Etirer_brosse_preview(short X1, short Y1, short X2, short Y2); void Etirer_brosse_preview(short X1, short Y1, short X2, short Y2);
/*!
Rotates the brush to the right from the given angle.
*/
void Tourner_brosse(float Angle); void Tourner_brosse(float Angle);
/*!
Stretch the brush to fit the given rectangle.
Uses fast approximation for the preview while changing the angle.
*/
void Tourner_brosse_preview(float Angle); void Tourner_brosse_preview(float Angle);
/*!
Remap the brush palette to the nearest color in the picture one.
Used when switching to the spare page.
*/
void Remap_brosse(void); void Remap_brosse(void);
/*!
Get color indexes used by the brush.
*/
void Get_colors_from_brush(void); void Get_colors_from_brush(void);
/*!
Outline the brush, add 1 foreground-colored pixel on the edges.
Edges are detected considering the backcolor as transparent.
*/
void Outline_brush(void); void Outline_brush(void);
/*!
Nibble the brush, remove 1 pixel on the edges and make it transparent (ie filled with back color).
Edges are detected considering the backcolor as transparent.
*/
void Nibble_brush(void); void Nibble_brush(void);
/*!
Get brush from picture according to a freehand form.
@param Vertices number of points in the freehand form
@param Points array of points coordinates
@param Effacement If set to 1, the captured area is also cleared from the picture.
*/
void Capturer_brosse_au_lasso(int Vertices, short * Points,short Effacement); void Capturer_brosse_au_lasso(int Vertices, short * Points,short Effacement);
#endif #endif

View File

@ -20,9 +20,35 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*!
Convert an SDL keysym to an ANSI/ASCII character.
@param Sym SDL symbol to convert
*/
word Conversion_ANSI(SDL_keysym Sym); word Conversion_ANSI(SDL_keysym Sym);
/*!
Convert an SDL keysym to an internal keycode number.
This is needed because SDL tends to split the information across the unicode sym, the regular sym, and the raw keycode.
We also need to differenciate 1 (keypad) and 1 (regular keyboard), and some other things.
@param Sym SDL symbol to convert
*/
word Conversion_Touche(SDL_keysym Sym); word Conversion_Touche(SDL_keysym Sym);
/*!
Helper function to convert between SDL system and old coding for keycodes. This is needed because some SDL keycode are actually unicode and won't fit in 8 bits.
@param scancode Scancode to convert
*/
word Touche_pour_scancode(word scancode); word Touche_pour_scancode(word scancode);
/*!
Returns key name in a string. Used to display them in the helpscreens and in the keymapper window.
@param Touche keycode of the key to translate, including modifiers
*/
const char * Nom_touche(word Touche); const char * Nom_touche(word Touche);
/*!
Gets the modifiers in our format from the SDL_Mod information.
@param Mod SDL modifiers state
*/
word Modificateurs_Touche(SDLMod Mod); word Modificateurs_Touche(SDLMod Mod);