Rectangle Fill Color

Rectangle Fill Color

Forum member · Jul 25, 2007
Hi. I am trying to use the Generator's Rectangle object. Before creating the instance of the rectangle, I set some of the parameters, including the fillColor and borderColor. ceTe.DynamicPDF.Color fc = (ceTe.DynamicPDF.Color)new ceTe.DynamicPDF.RgbColor(_fillR, _fillG, _fillB); _fillR, _fillG, and _fillB are all bytes set from an instance of System.Drawing.Color. This should be working, but no matter what the values are, it always shows up as white. I'm confused, because I have the same thing written for the borderColor, which seems to work flawlessly. ceTe.DynamicPDF.Color bc = (ceTe.DynamicPDF.Color)new ceTe.DynamicPDF.RgbColor(_borderR, _borderG, _borderB); Any ideas? Thanks!

Re: Rectangle Fill Color

Support · Jul 25, 2007
Hello, We are able to set the FillColor of the rectangle without any problem. Following is the sample code we used to set this. Document document = new Document(); Color color = (Color)new RgbColor(0.5F, 0.2F, 0.9F); Rectangle rectangle = new Rectangle(10,10,100,100); rec.FillColor = color; ceTe.DynamicPDF.Page page = new Page(); page.Elements.Add(rectangle); doc.Pages.Add(page); doc.DrawToWeb(); Please make sure that you are passing correct values to the RgbColor constructor and this will solve your problem. Thanks, ceTe Software Support Team.