Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render.cs « MacOSX « build « main - github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c6585bf39d2806923c443479f9c43b4178a5568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Drawing;
using System.Drawing.Imaging;

class X {
	static void Main (string[] args)
	{
		var background = new Bitmap ("dmg-bg.png");
		var ctx = Graphics.FromImage (background);
		
		//system.drawing doesn't allow setting the actual font weight
		//so we can't get it as heavy as we need :/
		var font = new Font ("Helvetica", 12, FontStyle.Bold);

		var light = new SolidBrush (Color.FromArgb (255, 255, 255, 255));
		var dark = new SolidBrush (Color.FromArgb (230, 151, 173, 190));

		float x = 10, y = 10;
		ctx.DrawString (args[0], font, light, new PointF (x, y + 1f));
		ctx.DrawString (args[0], font, dark, new PointF (x, y));

		background.Save ("dmg-bg-with-version.png", ImageFormat.Png);
	}
}