Examples

Logo WTUI

C source used to generate the documentation logo.

Source code

logo-wtui.c
/*
 * Copyright (c) 2024-2026 xDev-Language
 *
 * Library...: xDev-WTUI
 * File......: logo-wtui.c
 *
 */

#include "xdev-svg.h"

int main( void )
{
   const double width = 512, height = 512;
   Svg *svg = SvgInit( "logo-wtui.svg", ( int )width, ( int )height, width );

   if( !svg )
      return 1;

   SvgComment( svg, "#264D73 #070F17 #73264D #4D7326 #262773 #267373 #734C26 #E9EDF1" );

   SvgFilledCircle( svg, width / 2, height / 2, 255, "#73264D" );

   SvgPen( svg, 30, "#323232", F );

   SvgLine( svg, 42, ( height - 250 ) / 2, width - 42, ( height - 250 ) / 2, "" );

   SvgFilledRect( svg, 25, ( height - 220 ) / 2, width - 50, 180, "#F2F2F2", 0 );

   SvgLine( svg, 25, ( height + 141 ) / 2, width - 25, ( height + 141 ) / 2, "" );

   SvgCircle( svg, width / 2, height / 2, 256 - 15, 30, 0x323232 );

   const SvgTextStyle textStyle = {
      .font   = "Times New Roman",
      .size   = 140,
      .weight = FONT_WEIGHT_BOLD,
      .color  = "#0C0C0C",
      .align  = SVG_ALIGN_CENTER
   };

   /* Centred on the middle of the circle */
   SvgTextEx( svg, width / 2, ( height + 40 ) / 2, "WTUI", &textStyle );

   SvgClose( svg );

   return 0;
}
Open logo-wtui.c