/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** GUIX Component */ /** */ /** Display Management (Display) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_context.h" #include "gx_system.h" #include "gx_display.h" #include "gx_image_reader.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_24xrgb_png_draw PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* 24xrgb format screen driver PNG drawing function. */ /* */ /* INPUT */ /* */ /* context Drawing context */ /* xpos x-coord of top-left draw point*/ /* ypos y-coord of top-left draw point*/ /* pixelmap Pointer to GX_PIXELMAP struct */ /* */ /* OUTPUT */ /* */ /* None */ /* */ /* CALLS */ /* */ /* _gx_image_reader_create */ /* _gx_image_reader_start */ /* _gx_display_driver_24xrgb_pixelmap_draw */ /* _gx_system_memory_free */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* GUIX Internal Code */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) VOID _gx_display_driver_24xrgb_png_draw(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap) { GX_IMAGE_READER image_reader; GX_PIXELMAP pic_outmap; _gx_image_reader_create(&image_reader, pixelmap -> gx_pixelmap_data, (INT)pixelmap -> gx_pixelmap_data_size, GX_COLOR_FORMAT_24XRGB, GX_IMAGE_READER_MODE_ALPHA); if (_gx_image_reader_start(&image_reader, &pic_outmap) == GX_SUCCESS) { _gx_display_driver_24xrgb_pixelmap_draw(context, xpos, ypos, &pic_outmap); _gx_system_memory_free((VOID *)pic_outmap.gx_pixelmap_data); } } #endif