[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

XPMToPPChar

Converts an XPM image file into an array of PChar values.

Declaration

Source position: graphics.pp line 1995

function XPMToPPChar(

  const XPM: string

):PPChar;

Description

Converts an XPM image file into an array of PChar values. The memory is allocated as one block, so freeing can simply be done using FreeMem. The data is just behind the array.

An XPM file can be included in a C source file, because it has a C syntax. In the compiled program it is simply an array of PChar. This function converts an XPM source file to the same array, by removing the comments and the string constant symbols.


Version 3.2 Generated 2024-02-25 Home