示例#1
0
 public TPdfGradient(int aPatternId, TGradientType aGradientType, ColorBlend aBlendColors, RectangleF aCoords, PointF aCenterPoint, RectangleF aRotatedCoords, string aDrawingMatrix, List <TPdfFunction> FunctionList) : base(aPatternId, TPdfToken.GradientPrefix)
 {
     GradientType  = aGradientType;
     BlendFunction = GetBlendFunction(aBlendColors, FunctionList);
     CenterPoint   = aCenterPoint;
     Coords        = aCoords;
     RotatedCoords = aRotatedCoords;
     DrawingMatrix = aDrawingMatrix;
 }
示例#2
0
        internal TPdfGradient GetGradient(TGradientType aGradientType, ColorBlend aBlendColors, RectangleF aCoords, PointF aCenterPoint, RectangleF RotatedCoords, string DrawingMatrix)
        {
            TPdfGradient SearchGradient = new TPdfGradient(GradientPatterns.Count, aGradientType, aBlendColors, aCoords, aCenterPoint, RotatedCoords, DrawingMatrix, Functions);
            int Index = GradientPatterns.BinarySearch(0, GradientPatterns.Count, SearchGradient, null);  //Only BinarySearch compatible with CF.

            if (Index < 0)
                GradientPatterns.Insert(~Index, SearchGradient);
            else SearchGradient = GradientPatterns[Index];

            return SearchGradient;
        }
示例#3
0
 internal void SelectGradient(TPdfStream DataStream, TGradientType aGradientType, ColorBlend aBlendColors, RectangleF aCoords, PointF aCenterPoint, RectangleF aRotatedCoords, string DrawingMatrix)
 {
     TPdfGradient SearchGradient = GetGradient(aGradientType, aBlendColors, aCoords, aCenterPoint, aRotatedCoords, DrawingMatrix);
     SearchGradient.Select(DataStream);
 }