Example #1
0
        private void PaintTile(Tile tile)
        {
            TileCanvasRenderContext ctx;

            ctx = new TileCanvasRenderContext(this,
                                              tile);

            // IMPORTANT!  The <meta> tag has to be in the first
            // chunk written to the stream or else the encoding
            // will be wrong!
            ctx.Write("<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n");

            ctx.Write("<style type=\"text/css\" media=\"screen\">\n");
            RenderStyles(ctx);
            ctx.Write("</style>\n");

            ctx.Write("</head>\n");

            if (tile != null)
            {
                tile.Render(ctx);
            }

            ctx.Write("</html>");
        }
Example #2
0
		private void PaintTile (Tile tile)
		{
			TileCanvasRenderContext ctx;
			ctx = new TileCanvasRenderContext (this, 
							   tile);

			// IMPORTANT!  The <meta> tag has to be in the first
			// chunk written to the stream or else the encoding
			// will be wrong!
			ctx.Write ("<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n");

       			ctx.Write ("<style type=\"text/css\" media=\"screen\">\n");
			RenderStyles (ctx);
			ctx.Write ("</style>\n"); 

			ctx.Write ("</head>\n");

			if (tile != null) {
				tile.Render (ctx);
			}

			ctx.Write ("</html>");
		}