// ==PREPROCESSOR==
// @name "Glow Text Sample"
// @author "T.P Wang"
// @import "%fb2k_component_path%docs\helpers.txt"
// ==/PREPROCESSOR==

var g_font = gdi.Font("Segoe UI", 22, 1);
var g_drag = false;
var g_textrender = gdi.CreateStyleTextRender();
// RGB function is defined in docs\helpers.txt
var g_background_colour = RGB(0, 0, 0);

function on_paint(gr) {
	gr.SetTextRenderingHint(5);
	gr.SetSmoothingMode(4);
	gr.SetInterpolationMode(7);
	var ww = window.Width;
	var wh = window.Height;
	gr.FillSolidRect(0, 0, ww, wh, g_background_colour);
	// RGB / RGBA functions are defined in docs\helpers.txt
	g_textrender.GlowText(RGB(0, 0, 64), RGBA(255, 255, 0, 30), 12);
	// Clear previous shadow setting
	g_textrender.EnableShadow(true);
	g_textrender.ResetShadow();
	g_textrender.RenderStringRect(gr, "Glow Text Sample", g_font, 0, 0, ww, wh, 0x11005000);
}
