PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

XBrushes.Black, colour problem
https://forum.pdfsharp.net/viewtopic.php?f=2&t=984
Page 1 of 1

Author:  prasanga [ Thu Dec 10, 2009 5:21 pm ]
Post subject:  XBrushes.Black, colour problem

In side fn
----------------------------
if (_Draw)
_gfx.DrawRoundedRectangle(new XSolidBrush(this.shadowColor), rect2, new XSize(dEllipse + 8, dEllipse + 8));

XLinearGradientBrush brush = new XLinearGradientBrush(rect, this.backColor, this.backColor2, XLinearGradientMode.Vertical);

if (_Draw)
_gfx.DrawRoundedRectangle(this.borderPen, brush, rect, new XSize(dEllipse, dEllipse));

rect.Inflate(-5, -5);

XBrush _Colour = XBrushes.Black;
if (_Draw)
{
if(_Product.Namefont!=null)
_gfx.DrawString(_Product.Name, _Product.Namefont, _Product.NamefontColour, rect, XStringFormats.TopLeft);
else
_gfx.DrawString(_Product.Name, font, _Colour, rect, XStringFormats.TopLeft);
}

Main page onload
-------------------
BeginBox(ref oProducts, oProduct, ref outputDocument, ref gfx, 100, ref page, true, ref Lines);

MemoryStream stream = new MemoryStream();

outputDocument.Save(stream, false);

Response.Clear();

Response.ContentType = "application/pdf";

Response.AddHeader("content-length", stream.Length.ToString());

Response.BinaryWrite(stream.ToArray());

Response.Flush();

stream.Close();

Response.End();
---------------------------------
When colour black selected it won't show any text.Means it won't show colour in the text.But for all other colours working.Can any body help on this?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/