Sack Library Documentation
ContentsIndexReferenceHome
Example
POINTER some_loaded_data; // pretend it is initialized to something valid
   
Font font = RenderScaledFontData( some_loaded_data, NULL, NULL );
PutStringFont( image, 0, 0, BASE_COLOR_WHITE, 0, "Hello World", font );

 

Or, maybe your original designed screen was 1024x768, and it's now showing on 1600x1200, for the text to remain the same...

FRACTION width_scale;
FRACTION height_scale;
_32 w, h;
GetDisplaySize( &w, &h );
SetFraction( width_scale, w, 1024 );
SetFraction( height_scale, h, 768 );
   
Font font2 = RenderScaledFontData( some_loaded_data, &width_scale, &height_scale );
PutStringFont( image, 0, 0, BASE_COLOR_WHITE, 0, "Hello World", font2 );
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.