components/tft/tft.h

changeset 18
5d4a40fe9967
parent 0
b74b0e4902c3
child 20
3fd5e0fc075f
equal deleted inserted replaced
17:f3451031d6c6 18:5d4a40fe9967
517 * @param _brightness 0 ~ 1.0 517 * @param _brightness 0 ~ 1.0
518 */ 518 */
519 color_t HSBtoRGB(float _hue, float _sat, float _brightness); 519 color_t HSBtoRGB(float _hue, float _sat, float _brightness);
520 520
521 /** 521 /**
522 * @brief Decodes and displays JPG image
523 * Limits:
524 * Baseline only. Progressive and Lossless JPEG format are not supported.
525 * Image size: Up to 65520 x 65520 pixels
526 * Color space: YCbCr three components only. Gray scale image is not supported.
527 * Sampling factor: 4:4:4, 4:2:2 or 4:2:0.
528 *
529 * @param x image left position; constants CENTER & RIGHT can be used; negative value is accepted
530 * @param y image top position; constants CENTER & BOTTOM can be used; negative value is accepted
531 * @param scale image scale factor: 0~3; if scale>0, image is scaled by factor 1/(2^scale) (1/2, 1/4 or 1/8)
532 * @param fname pointer to the name of the file from which the image will be read
533 * if set to NULL, image will be read from memory buffer pointed to by 'buf'
534 * @param buf pointer to the memory buffer from which the image will be read; used if fname=NULL
535 * @param size size of the memory buffer from which the image will be read; used if fname=NULL & buf!=NULL
536 */
537 void TFT_jpg_image(int x, int y, uint8_t scale, char *fname, uint8_t *buf, int size);
538
539 /**
540 * @brief Decodes and displays BMP image
541 * Only uncompressed RGB 24-bit with no color space information BMP images can be displayed
542 *
543 * @param x image left position; constants CENTER & RIGHT can be used; negative value is accepted
544 * @param y image top position; constants CENTER & BOTTOM can be used; negative value is accepted
545 * @param scale image scale factor: 0~7; if scale>0, image is scaled by factor 1/(scale+1)
546 * @param fname pointer to the name of the file from which the image will be read
547 * if set to NULL, image will be read from memory buffer pointed to by 'imgbuf'
548 * @param imgbuf pointer to the memory buffer from which the image will be read; used if fname=NULL
549 * @param size size of the memory buffer from which the image will be read; used if fname=NULL & imgbuf!=NULL
550 */
551 int TFT_bmp_image(int x, int y, uint8_t scale, char *fname, uint8_t *imgbuf, int size);
552
553 /**
554 * @brief Get the touch panel coordinates. 522 * @brief Get the touch panel coordinates.
555 * The coordinates are adjusted to screen orientation if raw=0 523 * The coordinates are adjusted to screen orientation if raw=0
556 * 524 *
557 * @param[in] x pointer to X coordinate 525 * @param[in] x pointer to X coordinate
558 * @param[in] y pointer to Y coordinate 526 * @param[in] y pointer to Y coordinate

mercurial