comment {======================================================================== These coloring formulas were written by Robert K. Bunney Support files are highly recommended for the use of the Matting and Framming color formula. ======================================================================== } ;============================================================ ;============================================================ ; ; M A T T I N G & F R A M I N G ; ;============================================================ ;============================================================ Matting and Framing { ; Creates frames, matts, and grids where individual cells may be merged or ; filled. Written by Robert K. Bunney. February 2008 ; ; http://mysite.verizon.net/robert.bunney/MFCF_Support.htm $define DEBUG $define FULL_VERSION ; ========================= ; Global ; ========================== global: ; Image width and height in fractal coords (not pixel) units float fImageWidth float fImageHeight ; resolution in pixels float fXRes = real(#screenmax) float fYRes = imag(#screenmax) float fMag = 1 if (@bConstMag) fMag = #Magn endif if (round(fXRes) == round(fYRes)) fImageWidth = 4.0 /fMag * @fStretchXY fImageHeight = 4.0 /fMag elseif (fYRes > fXRes) fImageWidth = 4.0/fMag fImageHeight = 4.0*fYRes/fXRes/fMag if (@fStretchXY > 1.0) fImageWidth = fImageWidth * @fStretchXY elseif (@fStretchXY < 1.0) fImageHeight = fImageHeight / @fStretchXY endif else fImageHeight = 3.0/fMag fImageWidth = 3.0*fXRes/fYRes/fMag if (@fStretchXY > 1.0) fImageHeight = fImageHeight / @fStretchXY elseif (@fStretchXY < 1.0) fImageWidth = fImageWidth * @fStretchXY endif endif float fHalfImageWidth = fImageWidth/2 float fHalfImageHeight = fImageHeight/2 ;fScale maps 100 to 1/2 of the shortest side float fScale if (fImageWidth > fImageHeight) fScale = fImageHeight/200 else fScale = fImageWidth/200 endif float fXCenter ; Center of the screen float fYCenter float fLargeNumber = 9e99 if (@bUseCenter) fXCenter = real(#center) fYCenter = imag(#center) else fXCenter = 0 fYCenter = 0 endif float fNudge = fImageWidth * 0.000001 ;Size translated to current coordinates float fOuterFrameSize = fScale * @fFrameThick float fInnerFrameSize = fScale * @fInnerFrameThick float fHalfGridline = fScale * @fGridThickness/2 float fOffsetX = fScale * real(@cOffsetXY) float fOffsetY = fScale * imag(@cOffsetXY) ; two outside corners of the outside frame float fXBeyond1 = fXCenter - fImageWidth/2 float fYBeyond1 = fYCenter + fImageHeight/2 float fXBeyond2 = fXCenter + fImageWidth/2 float fYBeyond2 = fYCenter - fImageHeight/2 ; two corners of the inside of the outer frame float fXOuter1 = fXCenter - fImageWidth/2 + fOuterFrameSize + fNudge float fYOuter1 = fYCenter + fImageHeight/2 - fOuterFrameSize - fNudge float fXOuter2 = fXCenter + fImageWidth/2 - fOuterFrameSize - fNudge float fYOuter2 = fYCenter - fImageHeight/2 + fOuterFrameSize + fNudge float fOuterWidth = fXOuter2 - fXOuter1 float fOuterHeight = fYOuter1 - fYOuter2 float fHalfOuterWidth = fOuterWidth/2 float fHalfOuterHeight = fOuterHeight/2 ; two corners of the inside of the inner frame float fX1 = fXOuter1 + fInnerFrameSize float fY1 = fYOuter1 - fInnerFrameSize float fX2 = fXOuter2 - fInnerFrameSize float fY2 = fYOuter2 + fInnerFrameSize ;Width and Height inside the frame float fGridWidth = fX2 - fX1; + fScale * @fGridThickness float fGridHeight = fY1 - fY2 ;+ fScale * @fGridThickness float fColumnWidth = fGridWidth / @iCCols float fRowHeight = fGridHeight / @iCRows ;---------------- Setup Coloring Bases, and Scales ; Outer frame coloring float fColorNudge = 1/400 ; Back off end by one position float fOuterFrameColor = @fOuterColorRot + @fOuterColorRange/2 fOuterFrameColor = fOuterFrameColor - floor(fOuterFrameColor) float fOutsideGradBase = @fOuterColorRot float fOutsideGradScale = 1/(fOuterFrameSize) * (@fOuterColorRange - fColorNudge) ; Inner frame coloring float fInnerFrameColor = @fInnerColorRot + @fInnerColorRange/2 fInnerFrameColor = fInnerFrameColor - floor(fInnerFrameColor) float fInsideGradScale = 1/(fInnerFrameSize) * (@fInnerColorRange - fColorNudge) float fInsideGradBase = @fInnerColorRot ; ---Grid frame color float fGridColor = @fGridlineColorRot + @fGridlineColorRange/2 fGridColor = fGridColor - floor(fGridColor) float fGridGradScale = 1/fHalfGridline * (@fGridlineColorRange - fColorNudge) float fGridGradBase = @fGridlineColorRot float fAngle = @fCellRotation/180*#pi if (fAngle < 0), fAngle = fAngle+2*#pi, endif float fTanAngle = tan(abs(fAngle%(#pi/2))) float fCosAngle = cos(abs(fAngle%(#pi/2))) ; ---- Block fill color ----- float fFillColor = @fFillColorRot + @fFillColorRange*@fFillColorSingle float fEndFillColor = @fFillColorRot+@fFillColorRange-fColorNudge float fFillGradBase = @fFillColorRot if (@bCustomShape) int s = @iSweeps else int s = 1 endif ;----- Superformula preset values ---- float a=0, float b=0, float m=0, float n1=0, float n2=0, float n3=0 if ( (@enfillType == "Superformula Shapes")) if (@bCustomShape) a=@a, b=@b, m=@m, n1=@n1, n2=@n2, n3=@n3 elseif (@enShape == "#1: 1,1.1,24,1.7,0.7,6") a=1, b=1.1, m=24, n1=1.7, n2=0.7, n3=6 elseif (@enShape == "#2: -2.6,1.1,8,1.7,0.7,9.6") a=-2.6, b=1.1, m=8, n1=1.7, n2=0.7, n3=9.6 elseif (@enShape == "#3: 24,1.1,16,0.5,0.7,0") a=24, b=1.1, m=16, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "#4: 24,1.1,8,0.5,0.7,0") a=24, b=1.1, m=8, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "#5: 1,1,7,3,6,6") a=1, b=1, m=7, n1=3, n2=6, n3=6 elseif (@enShape == "#6: 6.5,1.1,8,0.5,0.7,0") a=6.5, b=1.1, m=8, n1=0.5, n2=0.7, n3=0.0 elseif (@enShape == "#7: 5,1.1,8,0.5,1.9,0") a=5, b=1.1, m=8, n1=0.5, n2=1.9, n3=0 elseif (@enShape == "#8: -1.3,1.1,8,1.7,4,0") a=-1.3, b=1.1, m=8, n1=1.7, n2=4, n3=0 elseif (@enShape == "#9: -5,1.1,10,0.54,1,0") a=-5, b=1.1, m=10, n1=0.54, n2=1, n3=0 elseif (@enShape == "#10: -5,1,10,0.5,2,0") a=-5, b=1, m=10, n1=0.5, n2=2, n3=0 elseif (@enShape == "#11: 1,1,3,5,18,18") a=1, b=1, m=3, n1=5, n2=18, n3=18 elseif (@enShape == "#12: 1,1,6,20,7,18") a=1, b=1, m=6, n1=20, n2=7, n3=18 elseif (@enShape == "#13: 1,1,4,2,1,3") a=1, b=1, m=4, n1=2, n2=1, n3=3 elseif (@enShape == "#14: 1,1,8,3,4,17") a=1, b=1, m=8, n1=3, n2=4, n3=17 elseif (@enShape == "#15: 1,0.6,12,32,1,-11") a=1, b=0.6, m=12, n1=32, n2=1, n3=-11 elseif (@enShape == "#16: 0.3,1.01,-8.1,1,1,150 (6)") a=0.3, b=1.01, m=-8.1, n1=1, n2=1, n3=150, s=6 elseif (@enShape == "#17: 1,1,19,9,14,13") a=1, b=1, m=19, n1=9, n2=14, n3=13 elseif (@enShape == "#18: 1.5,2,8,0.9,1.8,0.8") a=1.5, b=2, m=8, n1=0.9, n2=1.8, n3=0.8 elseif (@enShape == "#19: 1.6,1,12,1.5,2,7.5") a=1.6, b=1, m=12, n1=1.5, n2=2, n3=7.5 elseif (@enShape == "#20: 2.7,2.6,6,12,8.3,5.3") a=2.7, b=2.6, m=6, n1=12, n2=8.3, n3=5.3 elseif (@enShape == "#21: 1.5,2,2,1.7,0.7,2") a=1.5, b=2, m=2, n1=1.7, n2=0.7, n3=2 elseif (@enShape == "#22: 1.2,2.8,32,3,0.9,6") a=1.19, b=2.8, m=32, n1=3, n2=0.9, n3=6 elseif (@enShape == "#23: 0.9,10,4,4.2,17,1.5") a=0.9, b=10, m=4, n1=4.2, n2=17, n3=1.5 elseif (@enShape == "#24: 1,1,3,4.5,10,10") a=1, b=1, m=3, n1=4.5, n2=10, n3=10 elseif (@enShape == "#25: 1,1,4,12,15,15") a=1, b=1, m=4, n1=12, n2=15, n3=15 elseif (@enShape == "#26: 1,1,7,10,6,6") a=1, b=1, m=7, n1=10, n2=6, n3=6 elseif (@enShape == "#27: 0.3,1,-8.5,1,1,140 (4)") a=0.3, b=1, m=-8.5, n1=1, n2=1, n3=140, s=4 elseif (@enShape == "#28: 10,10,5,1,7,7") a=10, b=10, m=5, n1=1, n2=7, n3=7 elseif (@enShape == "#29: 1,1,12,15,20,3") a=1, b=1, m=12, n1=15, n2=20, n3=3 elseif (@enShape == "#30: 1,1,8,1,1,8") a=1, b=1, m=8, n1=1, n2=1, n3=8 elseif (@enShape == "#31: 0.3,1.01,-8.5,1,1,160 (4)") a=0.3, b=1.01, m=-8.5, n1=1, n2=1, n3=160, s=4 elseif (@enShape == "#32: 1,1,5,2,6,6") a=1, b=1, m=5, n1=2, n2=6, n3=6 elseif (@enShape == "#33: 1,1,6,1,1,6") a=1, b=1, m=6, n1=1, n2=1, n3=6 elseif (@enShape == "#34: 1,1,3,6,6,6") a=1, b=1, m=3, n1=6, n2=6, n3=6 elseif (@enShape == "#35: 1,1,2,1,1,1") a=1, b=1, m=2, n1=1, n2=1, n3=1 elseif (@enShape == "#36: 1,1,2,1,4,8") a=1, b=1, m=2, n1=1, n2=4, n3=8 elseif (@enShape == "#37: 1,1,8,7,8,2") a=1, b=1, m=8, n1=7, n2=8, n3=2 elseif (@enShape == "#38: 1,1,1,1,1,1") a=1, b=1, m=1, n1=1, n2=1, n3=1 elseif (@enShape == "#39: 1,1,2,1,1,-1.27") a=1, b=1, m=2, n1=1, n2=1, n3=-1.27 elseif (@enShape == "#40: 1,1,3,1,1,1") a=1, b=1, m=3, n1=1, n2=1, n3=1 elseif (@enShape == "#41: 1,1,4,1,1,1") a=1, b=1, m=4, n1=1, n2=1, n3=1 elseif (@enShape == "#42: 17,1,27.6,24,2,6 (4)") a=17, b=1, m=27.6, n1=24, n2=2, n3=6, s=4 elseif (@enShape == "#43: 1,1,6,1,1,1") a=1, b=1, m=6, n1=1, n2=1, n3=1 elseif (@enShape == "#44: 1,1,1,0.3,0.3,0.3") a=1, b=1, m=1, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#45: 1,1,2,0.3,0.3,0.3") a=1, b=1, m=2, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#46: 1,1,3,0.3,0.3,0.3") a=1, b=1, m=3, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#47: 1,1,4,0.3,0.3,0.3") a=1, b=1, m=4, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#48: 1.9,2.8,32,3,0.9,0.6") a=1.9, b=2.8, m=32, n1=3, n2=0.9, n3=0.6 elseif (@enShape == "#49: 1,0.85,2,-3,1,20") a=1, b=0.85, m=2, n1=-3, n2=1, n3=20 elseif (@enShape == "#50: 1,0.85,22,-0.11,0.9,4") a=1, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "#51: 0.4,0.85,22,-0.11,0.9,4") a=0.4, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "#52: 1,1.2,24,2,1,4") a=1, b=1.2, m=24, n1=2, n2=1, n3=4 elseif (@enShape == "#53: 1,1.21,4,-0.11,3.77,0.77") a=1, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "#54: -1.15,1.21,4,-0.11,3.77,0.77") a=-1.15, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "#55: 1.2,1.1,16,0.5,3.4,0.9") a=1.2, b=1.1, m=16, n1=0.5, n2=3.4, n3=0.9 elseif (@enShape == "#56: 1.2,1.2,4,0.5,3.5,1") a=1.2, b=1.2, m=4, n1=0.5, n2=3.5, n3=1 elseif (@enShape == "#57: 1.2,-2.0,4,0.5,9,1") a=1.2, b=-2, m=4, n1=0.5, n2=9, n3=1 elseif (@enShape == "#58: 1.2,-2.0,8,0.5,9,1") a=1.2, b=-2, m=8, n1=0.5, n2=9, n3=1 elseif (@enShape == "#59: 0.3,0.3,8,0.3,0.3,0.6") a=0.3, b=0.3, m=8, n1=0.3, n2=0.3, n3=0.6 elseif (@enShape == "#60: 1,1,1,1,1,40") a=1, b=1, m=1, n1=1, n2=1, n3=40 elseif (@enShape == "#61: 1,1,22,1,1,40") a=1, b=1, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "#62: 1,-0.67,22,1,1,40") a=1, b=-0.67, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "#63: 1,0.6,12,32,1,40") a=1, b=0.6, m=12, n1=32, n2=1, n3=40 elseif (@enShape == "#64: 1,0.6,12,32,400,40") a=1, b=0.6, m=12, n1=32, n2=400, n3=40 elseif (@enShape == "#65: 1,0.6,12,32,8,-11") a=1, b=0.6, m=12, n1=32, n2=8, n3=-11 elseif (@enShape == "#66: 17,1,27.6,3,2,6 (3)") a=17, b=1, m=27.6, n1=3, n2=2, n3=6, s=3 elseif (@enShape == "#67: 1,0.6,12,-400,1,270") a=1, b=0.6, m=12, n1=-400, n2=1, n3=270 elseif (@enShape == "#68: 1.05,1.1,24,0.4,3.5,0.87") a=1.05, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "#69: 1.5,2,2,2,1.7,6") a=1.2, b=2, m=2, n1=2, n2=1.7, n3=6 elseif (@enShape == "#70: 1.11,1.1,24,0.4,5,1.12") a=1.11, b=1.1, m=24, n1=0.4, n2=5, n3=1.12 elseif (@enShape == "#71: 1.11,1.1,44,1.1,0.9,0.3") a=1.11, b=1.1, m=44, n1=1.1, n2=0.9, n3=0.3 elseif (@enShape == "#72: 1,1.1,24,0.4,3.5,0.87") a=1, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "#73: 1,1.3,27.6,3,1,6 (3)") a=1, b=1.3, m=27.6, n1=3, n2=1, n3=6, s=3 elseif (@enShape == "#74: 1,1.4,24.5,3,1,6 (4)") a=1, b=1.4, m=24.5, n1=3, n2=1, n3=6, s=4 elseif (@enShape == "#75: 0.5,1.3,5.7,1,6,2 (4)") a=0.5, b=1.3, m=5.7, n1=1, n2=6, n3=2, s=4 elseif (@enShape == "#76: 1.5,2,9.9,1.8,0.8,4 (4)") a=1.5, b=2, m=9.9, n1=1.8, n2=0.8, n3=4, s=4 elseif (@enShape == "#77: 1,-0.67,22.3,1,1,40 (3)") a=1, b=-0.67, m=22.3, n1=1, n2=1, n3=40, s=3 endif endif int i, int j int iMR = 0, int iMD = 1 ;Array with two bools per cell with each bool meaning: ; 0 = Merge right ; 1 = Merge down ; Data will be in shifted one row and column (one based) and padded beyond the ; last row and column to remove special conditions within the loop bool rg_b_cell_exceptions[100+2,100+2,2] ; Coloring types int iTC = 0 ; Holds value of current colorint type int iTCSingle = 0 int iTCSolid = 1 int iTCGradient = 2 int iTCFill = 3 ; Let the block fill paint the removed gridline int rg_i_cell_color[100+2,100+2] ; Color for each individual block if (@enFillColor == "Single") iTC = iTCSingle elseif (@enFillColor == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif ; initialize array i = 0 j = 0 while (i < 100+2) while (j < 100+2) rg_b_cell_exceptions[i,j,iMR] = false rg_b_cell_exceptions[i,j,iMD] = false rg_i_cell_color[i,j] = iTC j = j+1 endwhile i = i+1 j = 0 endwhile ; Note bMergedCells is an efficency hack that that may be true ; when there are no merged cells. For example, if a range ; where to merge cells and then another range were to unmerge ; the cells, bMergedCells would still be true. bool bMergedCells = false $ifdef FULL_VERSION ;============================= ; Deal with the advanced data setup for ; merging and filling cells ;============================= if (@enBAorE=="Advanced") ;we do the advanced setup rg_b_cell_exceptions[1,1,iMR] = @R1C1_MR ; Process merge right block rg_b_cell_exceptions[1,2,iMR] = @R1C2_MR rg_b_cell_exceptions[1,3,iMR] = @R1C3_MR rg_b_cell_exceptions[1,4,iMR] = @R1C4_MR rg_b_cell_exceptions[1,5,iMR] = @R1C5_MR rg_b_cell_exceptions[1,6,iMR] = @R1C6_MR rg_b_cell_exceptions[2,1,iMR] = @R2C1_MR rg_b_cell_exceptions[2,2,iMR] = @R2C2_MR rg_b_cell_exceptions[2,3,iMR] = @R2C3_MR rg_b_cell_exceptions[2,4,iMR] = @R2C4_MR rg_b_cell_exceptions[2,5,iMR] = @R2C5_MR rg_b_cell_exceptions[2,6,iMR] = @R2C6_MR rg_b_cell_exceptions[3,1,iMR] = @R3C1_MR rg_b_cell_exceptions[3,2,iMR] = @R3C2_MR rg_b_cell_exceptions[3,3,iMR] = @R3C3_MR rg_b_cell_exceptions[3,4,iMR] = @R3C4_MR rg_b_cell_exceptions[3,5,iMR] = @R3C5_MR rg_b_cell_exceptions[3,6,iMR] = @R3C6_MR rg_b_cell_exceptions[4,1,iMR] = @R4C1_MR rg_b_cell_exceptions[4,2,iMR] = @R4C2_MR rg_b_cell_exceptions[4,3,iMR] = @R4C3_MR rg_b_cell_exceptions[4,4,iMR] = @R4C4_MR rg_b_cell_exceptions[4,5,iMR] = @R4C5_MR rg_b_cell_exceptions[4,6,iMR] = @R4C6_MR rg_b_cell_exceptions[5,1,iMR] = @R5C1_MR rg_b_cell_exceptions[5,2,iMR] = @R5C2_MR rg_b_cell_exceptions[5,3,iMR] = @R5C3_MR rg_b_cell_exceptions[5,4,iMR] = @R5C4_MR rg_b_cell_exceptions[5,5,iMR] = @R5C5_MR rg_b_cell_exceptions[5,6,iMR] = @R5C6_MR rg_b_cell_exceptions[6,1,iMR] = @R6C1_MR rg_b_cell_exceptions[6,2,iMR] = @R6C2_MR rg_b_cell_exceptions[6,3,iMR] = @R6C3_MR rg_b_cell_exceptions[6,4,iMR] = @R6C4_MR rg_b_cell_exceptions[6,5,iMR] = @R6C5_MR rg_b_cell_exceptions[6,6,iMR] = @R6C6_MR rg_b_cell_exceptions[7,1,iMR] = @R7C1_MR rg_b_cell_exceptions[7,2,iMR] = @R7C2_MR rg_b_cell_exceptions[7,3,iMR] = @R7C3_MR rg_b_cell_exceptions[7,4,iMR] = @R7C4_MR rg_b_cell_exceptions[7,5,iMR] = @R7C5_MR rg_b_cell_exceptions[7,6,iMR] = @R7C6_MR rg_b_cell_exceptions[1,1,iMD] = @R1C1_MD ; Process merge down block rg_b_cell_exceptions[1,2,iMD] = @R1C2_MD rg_b_cell_exceptions[1,3,iMD] = @R1C3_MD rg_b_cell_exceptions[1,4,iMD] = @R1C4_MD rg_b_cell_exceptions[1,5,iMD] = @R1C5_MD rg_b_cell_exceptions[1,6,iMD] = @R1C6_MD rg_b_cell_exceptions[1,7,iMD] = @R1C7_MD rg_b_cell_exceptions[2,1,iMD] = @R2C1_MD rg_b_cell_exceptions[2,2,iMD] = @R2C2_MD rg_b_cell_exceptions[2,3,iMD] = @R2C3_MD rg_b_cell_exceptions[2,4,iMD] = @R2C4_MD rg_b_cell_exceptions[2,5,iMD] = @R2C5_MD rg_b_cell_exceptions[2,6,iMD] = @R2C6_MD rg_b_cell_exceptions[2,7,iMD] = @R2C7_MD rg_b_cell_exceptions[3,1,iMD] = @R3C1_MD rg_b_cell_exceptions[3,2,iMD] = @R3C2_MD rg_b_cell_exceptions[3,3,iMD] = @R3C3_MD rg_b_cell_exceptions[3,4,iMD] = @R3C4_MD rg_b_cell_exceptions[3,5,iMD] = @R3C5_MD rg_b_cell_exceptions[3,6,iMD] = @R3C6_MD rg_b_cell_exceptions[3,7,iMD] = @R3C7_MD rg_b_cell_exceptions[4,1,iMD] = @R4C1_MD rg_b_cell_exceptions[4,2,iMD] = @R4C2_MD rg_b_cell_exceptions[4,3,iMD] = @R4C3_MD rg_b_cell_exceptions[4,4,iMD] = @R4C4_MD rg_b_cell_exceptions[4,5,iMD] = @R4C5_MD rg_b_cell_exceptions[4,6,iMD] = @R4C6_MD rg_b_cell_exceptions[4,7,iMD] = @R4C7_MD rg_b_cell_exceptions[5,1,iMD] = @R5C1_MD rg_b_cell_exceptions[5,2,iMD] = @R5C2_MD rg_b_cell_exceptions[5,3,iMD] = @R5C3_MD rg_b_cell_exceptions[5,4,iMD] = @R5C4_MD rg_b_cell_exceptions[5,5,iMD] = @R5C5_MD rg_b_cell_exceptions[5,6,iMD] = @R5C6_MD rg_b_cell_exceptions[5,7,iMD] = @R5C7_MD rg_b_cell_exceptions[6,1,iMD] = @R6C1_MD rg_b_cell_exceptions[6,2,iMD] = @R6C2_MD rg_b_cell_exceptions[6,3,iMD] = @R6C3_MD rg_b_cell_exceptions[6,4,iMD] = @R6C4_MD rg_b_cell_exceptions[6,5,iMD] = @R6C5_MD rg_b_cell_exceptions[6,6,iMD] = @R6C6_MD rg_b_cell_exceptions[6,7,iMD] = @R6C7_MD if (@enIndvColor == "Single") iTC = iTCSingle elseif (@enIndvColor == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (@R1C1_FL), rg_i_cell_color[1,1] = iTC, endif if (@R1C2_FL), rg_i_cell_color[1,2] = iTC, endif if (@R1C3_FL), rg_i_cell_color[1,3] = iTC, endif if (@R1C4_FL), rg_i_cell_color[1,4] = iTC, endif if (@R1C5_FL), rg_i_cell_color[1,5] = iTC, endif if (@R1C6_FL), rg_i_cell_color[1,6] = iTC, endif if (@R1C7_FL), rg_i_cell_color[1,7] = iTC, endif if (@R2C1_FL), rg_i_cell_color[2,1] = iTC, endif if (@R2C2_FL), rg_i_cell_color[2,2] = iTC, endif if (@R2C3_FL), rg_i_cell_color[2,3] = iTC, endif if (@R2C4_FL), rg_i_cell_color[2,4] = iTC, endif if (@R2C5_FL), rg_i_cell_color[2,5] = iTC, endif if (@R2C6_FL), rg_i_cell_color[2,6] = iTC, endif if (@R2C7_FL), rg_i_cell_color[2,7] = iTC, endif if (@R3C1_FL), rg_i_cell_color[3,1] = iTC, endif if (@R3C2_FL), rg_i_cell_color[3,2] = iTC, endif if (@R3C3_FL), rg_i_cell_color[3,3] = iTC, endif if (@R3C4_FL), rg_i_cell_color[3,4] = iTC, endif if (@R3C5_FL), rg_i_cell_color[3,5] = iTC, endif if (@R3C6_FL), rg_i_cell_color[3,6] = iTC, endif if (@R3C7_FL), rg_i_cell_color[3,7] = iTC, endif if (@R4C1_FL), rg_i_cell_color[4,1] = iTC, endif if (@R4C2_FL), rg_i_cell_color[4,2] = iTC, endif if (@R4C3_FL), rg_i_cell_color[4,3] = iTC, endif if (@R4C4_FL), rg_i_cell_color[4,4] = iTC, endif if (@R4C5_FL), rg_i_cell_color[4,5] = iTC, endif if (@R4C6_FL), rg_i_cell_color[4,6] = iTC, endif if (@R4C7_FL), rg_i_cell_color[4,7] = iTC, endif if (@R5C1_FL), rg_i_cell_color[5,1] = iTC, endif if (@R5C2_FL), rg_i_cell_color[5,2] = iTC, endif if (@R5C3_FL), rg_i_cell_color[5,3] = iTC, endif if (@R5C4_FL), rg_i_cell_color[5,4] = iTC, endif if (@R5C5_FL), rg_i_cell_color[5,5] = iTC, endif if (@R5C6_FL), rg_i_cell_color[5,6] = iTC, endif if (@R5C7_FL), rg_i_cell_color[5,7] = iTC, endif if (@R6C1_FL), rg_i_cell_color[6,1] = iTC, endif if (@R6C2_FL), rg_i_cell_color[6,2] = iTC, endif if (@R6C3_FL), rg_i_cell_color[6,3] = iTC, endif if (@R6C4_FL), rg_i_cell_color[6,4] = iTC, endif if (@R6C5_FL), rg_i_cell_color[6,5] = iTC, endif if (@R6C6_FL), rg_i_cell_color[6,6] = iTC, endif if (@R6C7_FL), rg_i_cell_color[6,7] = iTC, endif if (@R7C1_FL), rg_i_cell_color[7,1] = iTC, endif if (@R7C2_FL), rg_i_cell_color[7,2] = iTC, endif if (@R7C3_FL), rg_i_cell_color[7,3] = iTC, endif if (@R7C4_FL), rg_i_cell_color[7,4] = iTC, endif if (@R7C5_FL), rg_i_cell_color[7,5] = iTC, endif if (@R7C6_FL), rg_i_cell_color[7,6] = iTC, endif if (@R7C7_FL), rg_i_cell_color[7,7] = iTC, endif i = 0 j = 0 while (i <= @iCRows) ; If any cell is merged bMergedCells == true while (j <= @iCCols) bMergedCells = bMergedCells \ || rg_b_cell_exceptions[i,j,iMR] \ || rg_b_cell_exceptions[i,j,iMD] j = j+1 endwhile i = i+1 j = 0 endwhile endif ; @enBAorE=="Advanced" if (@enBAorE=="Expert") ;============================= ; Deal with the expert data setup ;============================= int rg_bitsets[31]; ;==== ; Process Merge Rigth ;==== rg_bitsets[ 0] = @MR_R1 rg_bitsets[ 1] = @MR_R2 rg_bitsets[ 2] = @MR_R3 rg_bitsets[ 3] = @MR_R4 rg_bitsets[ 4] = @MR_R5 rg_bitsets[ 5] = @MR_R6 rg_bitsets[ 6] = @MR_R7 rg_bitsets[ 7] = @MR_R8 rg_bitsets[ 8] = @MR_R9 rg_bitsets[ 9] = @MR_R10 rg_bitsets[10] = @MR_R11 rg_bitsets[11] = @MR_R12 rg_bitsets[12] = @MR_R13 rg_bitsets[13] = @MR_R14 rg_bitsets[14] = @MR_R15 rg_bitsets[15] = @MR_R16 rg_bitsets[16] = @MR_R17 rg_bitsets[17] = @MR_R18 rg_bitsets[18] = @MR_R19 rg_bitsets[19] = @MR_R20 rg_bitsets[20] = @MR_R21 rg_bitsets[21] = @MR_R22 rg_bitsets[22] = @MR_R23 rg_bitsets[23] = @MR_R24 rg_bitsets[24] = @MR_R25 rg_bitsets[25] = @MR_R26 rg_bitsets[26] = @MR_R27 rg_bitsets[27] = @MR_R28 rg_bitsets[28] = @MR_R29 rg_bitsets[29] = @MR_R30 rg_bitsets[30] = @MR_R31 int bitset int remainder i = 1 j = 1 float temp while (i <= @iCRows) ; Extract all the bit values into bool array bitset = rg_bitsets[i-1] while (j < @iCCols) remainder = bitset % 2 if (remainder == 1) rg_b_cell_exceptions[i,j,iMR] = true bMergedCells = true endif temp = bitset ; Using floating point values is a really temp = temp /2 ; *ugly* way to shift bits in an integer bitset = floor(temp) ; WHY doesn't UF support integer division? j = j+1 endwhile j = 1 i = i+1 endwhile ;==== ; Process Merge DN ;==== rg_bitsets[ 0] = @MD_R1 rg_bitsets[ 1] = @MD_R2 rg_bitsets[ 2] = @MD_R3 rg_bitsets[ 3] = @MD_R4 rg_bitsets[ 4] = @MD_R5 rg_bitsets[ 5] = @MD_R6 rg_bitsets[ 6] = @MD_R7 rg_bitsets[ 7] = @MD_R8 rg_bitsets[ 8] = @MD_R9 rg_bitsets[ 9] = @MD_R10 rg_bitsets[10] = @MD_R11 rg_bitsets[11] = @MD_R12 rg_bitsets[12] = @MD_R13 rg_bitsets[13] = @MD_R14 rg_bitsets[14] = @MD_R15 rg_bitsets[15] = @MD_R16 rg_bitsets[16] = @MD_R17 rg_bitsets[17] = @MD_R18 rg_bitsets[18] = @MD_R19 rg_bitsets[19] = @MD_R20 rg_bitsets[20] = @MD_R21 rg_bitsets[21] = @MD_R22 rg_bitsets[22] = @MD_R23 rg_bitsets[23] = @MD_R24 rg_bitsets[24] = @MD_R25 rg_bitsets[25] = @MD_R26 rg_bitsets[26] = @MD_R27 rg_bitsets[27] = @MD_R28 rg_bitsets[28] = @MD_R29 rg_bitsets[29] = @MD_R30 rg_bitsets[30] = @MD_R31 i = 1 j = 1 while (i <= @iCRows) ; Extract all the bit values into bool array bitset = rg_bitsets[i-1] while (j <= @iCCols) remainder = bitset % 2 if (remainder == 1) rg_b_cell_exceptions[i,j,iMD] = true bMergedCells = true endif temp = bitset ; Using floating point values is a really temp = temp /2 ; *ugly* way to shift bits in an integer bitset = floor(temp) ; WHY doesn't UF support integer division? j = j+1 endwhile j = 1 i = i+1 endwhile ;==== ; Process Fill Cell ;==== rg_bitsets[ 0] = @FL_R1 rg_bitsets[ 1] = @FL_R2 rg_bitsets[ 2] = @FL_R3 rg_bitsets[ 3] = @FL_R4 rg_bitsets[ 4] = @FL_R5 rg_bitsets[ 5] = @FL_R6 rg_bitsets[ 6] = @FL_R7 rg_bitsets[ 7] = @FL_R8 rg_bitsets[ 8] = @FL_R9 rg_bitsets[ 9] = @FL_R10 rg_bitsets[10] = @FL_R11 rg_bitsets[11] = @FL_R12 rg_bitsets[12] = @FL_R13 rg_bitsets[13] = @FL_R14 rg_bitsets[14] = @FL_R15 rg_bitsets[15] = @FL_R16 rg_bitsets[16] = @FL_R17 rg_bitsets[17] = @FL_R18 rg_bitsets[18] = @FL_R19 rg_bitsets[19] = @FL_R20 rg_bitsets[20] = @FL_R21 rg_bitsets[21] = @FL_R22 rg_bitsets[22] = @FL_R23 rg_bitsets[23] = @FL_R24 rg_bitsets[24] = @FL_R25 rg_bitsets[25] = @FL_R26 rg_bitsets[26] = @FL_R27 rg_bitsets[27] = @FL_R28 rg_bitsets[28] = @FL_R29 rg_bitsets[29] = @FL_R30 rg_bitsets[30] = @FL_R31 if (@enIndvColor == "Single") iTC = iTCSingle elseif (@enIndvColor == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif i = 1 ; It's ugly repeating this code three times. j = 1 while (i <= @iCRows) ; Extract all the bit values into bool array bitset = rg_bitsets[i-1] while (j <= @iCCols) remainder = bitset % 2 if (remainder == 1) rg_i_cell_color[i,j] = iTC endif temp = bitset ; Using floating point values is a really temp = temp /2 ; *ugly* way to shift bits in an integer bitset = floor(temp) ; WHY doesn't UF support integer division? j = j+1 endwhile j = 1 i = i+1 endwhile endif ; (@BAorE != "Advanced") ; ---- Merges: Horizontal and Both Mirroring int iEnd = 0 if ((@enMergeSymmetry == "Mirror Across Horizontal") || (@enMergeSymmetry == "Horizontal and Vertical Mirror")) i = 1 j = 1 iEnd = @iCRows while (i <= iEnd) while (j <= @iCCols) rg_b_cell_exceptions[iEnd,j,iMR] = rg_b_cell_exceptions[i,j,iMR] rg_b_cell_exceptions[iEnd,j,iMD] = rg_b_cell_exceptions[i-1,j,iMD] j = j+1 endwhile j = 1 i = i+1 iEnd = iEnd - 1 endwhile endif ; ---- Merges: Vertical and Both Mirroring ---- if ((@enMergeSymmetry == "Mirror Across Vertical") || (@enMergeSymmetry == "Horizontal and Vertical Mirror")) i = 1 j = 1 iEnd = @iCCols while (j <= iEnd) while (i <= @iCRows) rg_b_cell_exceptions[i,iEnd-1,iMR] = rg_b_cell_exceptions[i,j,iMR] rg_b_cell_exceptions[i,iEnd,iMD] = rg_b_cell_exceptions[i,j,iMD] i = i+1 endwhile i = 1 j = j+1 iEnd = iEnd - 1 endwhile endif ; ---- Merges: Custom Tiling ---- if (@enMergeSymmetry == "Custom Tiling" && (@iTileWidth > 0) && (@iTileHeight > 0)) int iTW = @iTileWidth int iTH = @iTileHeight if (iTW > @iCCols), iTW = @iCCols, endif if (ITH > @iCRows), iTH = @iCRows, endif int iTWT = 1 ; Markers inside the pattern int iTHT = 1 int iST = 1 ; Start position (used for wrapping) int i = 1 int j = iTW+1 while (i <= @iCRows) while (j <= @iCCols) if (j < @iCCols) rg_b_cell_exceptions[i,j,iMR] = rg_b_cell_exceptions[iTHT,iTWT,iMR] endif if (i < @iCRows) rg_b_cell_exceptions[i,j,iMD] = rg_b_cell_exceptions[iTHT,iTWT,iMD] endif iTWT = iTWT+1 if (iTWT > @iTileWidth), iTWT = 1, endif j = j + 1 endwhile j = 1 iTHT = iTHT + 1 if (iTHT > @iTileHeight) if (@bTileWrap), iST = iTWT, else, iST = 1, endif iTHT = 1 endif iTWT = iST i = i + 1 endwhile endif ; ---- Fills: Horizontal and Both Mirroring int iEnd = 0 if ((@enFillSymmetry == "Mirror Across Horizontal") || (@enFillSymmetry == "Horizontal and Vertical Mirror")) i = 1 j = 1 iEnd = @iCRows while (i <= iEnd) while (j <= @iCCols) rg_i_cell_color[iEnd,j] = rg_i_cell_color[i,j] j = j+1 endwhile j = 1 i = i+1 iEnd = iEnd - 1 endwhile endif ; ---- Fills: Vertical and Both Mirroring ---- if ((@enFillSymmetry == "Mirror Across Vertical") || (@enFillSymmetry == "Horizontal and Vertical Mirror")) i = 1 j = 1 iEnd = @iCCols while (j <= iEnd) while (i <= @iCRows) rg_i_cell_color[i,iEnd] = rg_i_cell_color[i,j] i = i+1 endwhile i = 1 j = j+1 iEnd = iEnd - 1 endwhile endif ; ---- Fills: Custom Tiling ---- if (@enFillSymmetry == "Custom Tiling" && (@iFillTileWidth > 0) && (@iFillTileHeight > 0)) int iTW = @iFillTileWidth int iTH = @iFillTileHeight if (iTW > @iCCols), iTW = @iCCols, endif if (ITH > @iCRows), iTH = @iCRows, endif int iTWT = 1 ; Markers inside the pattern int iTHT = 1 int iST = 1 ; Start position (used for wrapping) int i = 1 int j = iTW+1 while (i <= @iCRows) while (j <= @iCCols) rg_i_cell_color[i,j] = rg_i_cell_color[iTHT,iTWT] iTWT = iTWT+1 if (iTWT > @iFillTileWidth), iTWT = 1, endif j = j + 1 endwhile j = 1 iTHT = iTHT + 1 if (iTHT > @iFillTileHeight) if (@bFillTileWrap), iST = iTWT, else, iST = 1, endif iTHT = 1 endif iTWT = iST i = i + 1 endwhile endif $endif ; ------ Merge Range #1 -------------------- if (((@iSRM1 < @iERM1) || (@iSCM1 < @iECM1))) int iRowStart = @iSRM1 int iColStart = @iSCM1 int iRowEnd = @iERM1 int iColEnd = @iECM1 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM1 > 1) && (@enMrgRng1 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM1-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM1 > 1) && (@enMrgRng1 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM1-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng1 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng1 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng1 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng1 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #2 -------------------- if (((@iSRM2 < @iERM2) || (@iSCM2 < @iECM2))) int iRowStart = @iSRM2 int iColStart = @iSCM2 int iRowEnd = @iERM2 int iColEnd = @iECM2 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM2 > 1) && (@enMrgRng2 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM2-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM2 > 1) && (@enMrgRng2 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM2-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng2 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng2 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng2 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng2 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #3 -------------------- if (((@iSRM3 < @iERM3) || (@iSCM3 < @iECM3))) int iRowStart = @iSRM3 int iColStart = @iSCM3 int iRowEnd = @iERM3 int iColEnd = @iECM3 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM3 > 1) && (@enMrgRng3 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM3-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM3 > 1) && (@enMrgRng3 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM3-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng3 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng3 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng3 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng3 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #4 -------------------- if (((@iSRM4 < @iERM4) || (@iSCM4 < @iECM4))) int iRowStart = @iSRM4 int iColStart = @iSCM4 int iRowEnd = @iERM4 int iColEnd = @iECM4 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM4 > 1) && (@enMrgRng4 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM4-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM4 > 1) && (@enMrgRng4 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM4-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng4 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng4 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng4 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng4 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #5 -------------------- if (((@iSRM5 < @iERM5) || (@iSCM5 < @iECM5))) int iRowStart = @iSRM5 int iColStart = @iSCM5 int iRowEnd = @iERM5 int iColEnd = @iECM5 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM5 > 1) && (@enMrgRng5 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM5-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM5 > 1) && (@enMrgRng5 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM5-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng5 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng5 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng5 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng5 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #6 -------------------- if (((@iSRM6 < @iERM6) || (@iSCM6 < @iECM6))) int iRowStart = @iSRM6 int iColStart = @iSCM6 int iRowEnd = @iERM6 int iColEnd = @iECM6 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM6 > 1) && (@enMrgRng6 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM6-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM6 > 1) && (@enMrgRng6 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM6-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng6 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng6 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng6 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng6 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #7 -------------------- if (((@iSRM7 < @iERM7) || (@iSCM7 < @iECM7))) int iRowStart = @iSRM7 int iColStart = @iSCM7 int iRowEnd = @iERM7 int iColEnd = @iECM7 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM7 > 1) && (@enMrgRng7 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM7-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM7 > 1) && (@enMrgRng7 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM7-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng7 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng7 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng7 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng7 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ; ------ Merge Range #8 -------------------- if (((@iSRM8 < @iERM8) || (@iSCM8 < @iECM8))) int iRowStart = @iSRM8 int iColStart = @iSCM8 int iRowEnd = @iERM8 int iColEnd = @iECM8 if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) if ((@iSCM8 > 1) && (@enMrgRng8 == "Restore Rectangle")) rg_b_cell_exceptions[i,@iSCM8-1,iMR] = false endif while(j <= iColEnd) if ((@iSRM8 > 1) && (@enMrgRng8 == "Restore Rectangle")) rg_b_cell_exceptions[@iSRM8-1,j,iMD] = false endif bMergedCells = true if ((j < iColEnd) || (@enMrgRng8 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMR] = (@enMrgRng8 == "Remove Gridlines") endif if ((i < iRowEnd) || (@enMrgRng8 == "Restore Rectangle")) rg_b_cell_exceptions[i,j,iMD] = (@enMrgRng8 == "Remove Gridlines") endif j = j+1 endwhile i = i + 1 j = iColStart endwhile endif int rg_unified[100+2,100+2] ; Keeps track of cells that are merged together. int iNoUnify = -10000 ; Array of rectangles defining a single cell ; ; Note though UF array's are zero based, this is a 1-based ; array so that it matches rg_cell_exceptions and makes the math in ; the inner loops clearer and more efficient (i.e. less boundry ; conditions). ; float rg_cell_def[100+2,100+2,21] ; Indicies used to access rg_cell_def[] int iULX = 0, int iULY = 1, int iLRX = 2, int iLRY = 3 ; rect used to figure out painting int iHDX = 4, int iHDY = 5, int iCX = 6, int iCY = 7 int iULXHT = 8, int iULYHT = 9, int iLRXHT = 10, int iLRYHT = 11 ; Original Cell before merging int iHDXHT = 12, int iHDYHT = 13, int iCXHT = 14, int iCYHT = 15 int iSTRH = 16 ; Stretch used for the cell int iXREF = 17 ; X Reference point if using equal banding in a stretch int iYREF = 18 ; Y Reference point if using equal banding in a stretch int iFLSC = 19 ; Fill scale used to scale distance to range in the gradient. int iFLMAX = 20 ; Maximum distance/value produced by a shape (not used by all shapes) ; Define upper left and lower right corners for ; all the cells i = 1 ; rows j = 1 ; cols float fCellX1 = fX1 ; Upper left corner of cell float fCellY1 = fY1 ; Modulated and Random fills use the row and column to decide the color ; When fill of cells is merged, all merged cells need to have to same ; color and therefore use the same row/col pair. int iUCRow = 0, int iUCCol = 1 int rg_UseCenter[100+2,100+2,2] while (i <= @iCRows) ; Setup array of cell definitions while (j <= @iCCols) rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j rg_cell_def[i,j,iULX] = fCellX1 ; Set of values used during painting rg_cell_def[i,j,iULY] = fCellY1 rg_cell_def[i,j,iLRX] = fCellX1 + fColumnWidth + fNudge rg_cell_def[i,j,iLRY] = fCellY1 - fRowHeight - fNudge ; Set used for hit test rg_cell_def[i,j,iULXHT] = rg_cell_def[i,j,iULX] rg_cell_def[i,j,iULYHT] = rg_cell_def[i,j,iULY] rg_cell_def[i,j,iLRXHT] = rg_cell_def[i,j,iLRX] rg_cell_def[i,j,iLRYHT] = rg_cell_def[i,j,iLRY] float fHalfdxHT = (rg_cell_def[i,j,iLRX] - rg_cell_def[i,j,iULX])/2 float fHalfdyHT = (rg_cell_def[i,j,iULY] - rg_cell_def[i,j,iLRY])/2 float fHalfdx = (rg_cell_def[i,j,iLRX] - rg_cell_def[i,j,iULX])/2 float fHalfdy = (rg_cell_def[i,j,iULY] - rg_cell_def[i,j,iLRY])/2 rg_cell_def[i,j,iHDX] = fHalfdx rg_cell_def[i,j,iHDY] = fHalfdy rg_cell_def[i,j,iHDXHT] = fHalfdxHT rg_cell_def[i,j,iHDYHT] = fHalfdyHT rg_cell_def[i,j,iCX] = rg_cell_def[i,j,iULX] + fHalfdx rg_cell_def[i,j,iCY] = rg_cell_def[i,j,iULY] - fHalfdy rg_cell_def[i,j,iCXHT] = rg_cell_def[i,j,iULXHT] + fHalfdxHT rg_cell_def[i,j,iCYHT] = rg_cell_def[i,j,iULYHT] - fHalfdyHT rg_unified[i,j] = iNoUnify ; Each cell gets a unique merge value iNoUnify = iNoUnify + 1 ; that does not intersect values given ; to groups of merged cells. ; Setup for next cell fCellX1 = fCellX1 + fColumnWidth j = j+1 endwhile fCellY1 = fCellY1 - fRowHeight i = i+1 j = 1 fCellX1 = fX1 ;-fHalfGridline endwhile ; Initialize to get rid of warnings float fXT1 = 0.0, float fYT1 = 0.0, float fXT2 = 0.0, float fYT2 = 0.0 float fHDXT = 0.0, float fHDYT = 0.0, float fCXT = 0.0, float fCYT = 0.0 ;---------- Unify fills #1 ---------------- if ((@iSRUR1 <= @iERUR1) || (@iSCUR1 <= @iECUR1)) int iRowStart = @iSRUR1 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR1 int iRowEnd = @iERUR1 int iColEnd = @iECUR1 if (@enClrUR1 == "Single") iTC = iTCSingle elseif (@enClrUR1 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR1) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR1) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR1) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -2 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #2 ---------------- if ((@iSRUR2 <= @iERUR2) || (@iSCUR2 <= @iECUR2)) int iRowStart = @iSRUR2 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR2 int iRowEnd = @iERUR2 int iColEnd = @iECUR2 if (@enClrUR2 == "Single") iTC = iTCSingle elseif (@enClrUR2 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR2) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR2) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR2) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -3 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #3 ---------------- if ((@iSRUR3 <= @iERUR3) || (@iSCUR3 <= @iECUR3)) int iRowStart = @iSRUR3 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR3 int iRowEnd = @iERUR3 int iColEnd = @iECUR3 if (@enClrUR3 == "Single") iTC = iTCSingle elseif (@enClrUR3 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR3) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR3) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR3) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -4 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #4 ---------------- if ((@iSRUR4 <= @iERUR4) || (@iSCUR4 <= @iECUR4)) int iRowStart = @iSRUR4 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR4 int iRowEnd = @iERUR4 int iColEnd = @iECUR4 if (@enClrUR4 == "Single") iTC = iTCSingle elseif (@enClrUR4 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR4) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR4) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR4) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -5 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #5 ---------------- if ((@iSRUR5 <= @iERUR5) || (@iSCUR5 <= @iECUR5)) int iRowStart = @iSRUR5 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR5 int iRowEnd = @iERUR5 int iColEnd = @iECUR5 if (@enClrUR5 == "Single") iTC = iTCSingle elseif (@enClrUR5 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR5) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR5) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR5) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -6 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #6 ---------------- if ((@iSRUR6 <= @iERUR6) || (@iSCUR6 <= @iECUR6)) int iRowStart = @iSRUR6 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR6 int iRowEnd = @iERUR6 int iColEnd = @iECUR6 if (@enClrUR6 == "Single") iTC = iTCSingle elseif (@enClrUR6 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR6) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR6) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR6) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -7 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #7 ---------------- if ((@iSRUR7 <= @iERUR7) || (@iSCUR2 <= @iECUR7)) int iRowStart = @iSRUR7 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR7 int iRowEnd = @iERUR7 int iColEnd = @iECUR7 if (@enClrUR7 == "Single") iTC = iTCSingle elseif (@enClrUR7 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR7) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR7) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR7) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -8 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---------- Unify fills #8 ---------------- if ((@iSRUR8 <= @iERUR8) || (@iSCUR8 <= @iECUR8)) int iRowStart = @iSRUR8 ; Start rows/cols and End rows/cols for the unify/color int iColStart = @iSCUR8 int iRowEnd = @iERUR8 int iColEnd = @iECUR8 if (@enClrUR8 == "Single") iTC = iTCSingle elseif (@enClrUR8 == "Solid") iTC = iTCSolid else ; Gradient iTC = iTCGradient endif if (iRowStart < 1), iRowStart = 1, endif if (iColStart < 1), iColStart = 1, endif if (iRowEnd > @iCRows), iRowEnd = @iCRows, endif if (iColEnd > @iCCols), iColEnd = @iCCols, endif if (@bUnifyUR8) float fXT1 = rg_cell_def[iRowStart,iColStart,iULXHT] float fYT1 = rg_cell_def[iRowStart,iColStart,iULYHT] float fXT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRXHT] float fYT2 = rg_cell_def[iRowEnd ,iColEnd ,iLRYHT] float fHDXT = (fXT2 - fXT1)/2 float fHDYT = (fYT1 - fYT2)/2 float fCXT = fXT1 + fHDXT float fCYT = fYT1 - fHDYT endif ; Set the range of cells to the same values i = iRowStart j = iColStart while(i <= iRowEnd) while(j <= iColEnd) if (!@bUnifyUR8) fXT1 = rg_cell_def[i,j,iULXHT] fYT1 = rg_cell_def[i,j,iULYHT] fXT2 = rg_cell_def[i,j,iLRXHT] fYT2 = rg_cell_def[i,j,iLRYHT] fHDXT = (fXT2 - fXT1)/2 fHDYT = (fYT1 - fYT2)/2 fCXT = fXT1 + fHDXT fCYT = fYT1 - fHDYT endif rg_i_cell_color[i,j] = iTC if (!@bUnifyUR8) rg_unified[i,j] = iNoUnify iNoUnify = iNoUnify + 1 rg_UseCenter[i,j,iUCRow] = i rg_UseCenter[i,j,iUCCol] = j else rg_unified[i,j] = -9 rg_UseCenter[i,j,iUCRow] = iRowStart rg_UseCenter[i,j,iUCCol] = iColStart endif rg_cell_def[i,j,iULX] = fXT1 rg_cell_def[i,j,iULY] = fYT1 rg_cell_def[i,j,iLRX] = fXT2 rg_cell_def[i,j,iLRY] = fYT2 rg_cell_def[i,j,iHDX] = fHDXT rg_cell_def[i,j,iHDY] = fHDYT rg_cell_def[i,j,iCX] = fCXT rg_cell_def[i,j,iCY] = fCYT j = j+1 endwhile i = i + 1 j = iColStart endwhile endif ;---- Unify Merged Cells ---- ; This code merges together for fills any connected cells (i.e. have ; there gridlines removed. Connected cells have can be of very complex ; shapes (consider a spiral). Recursion is a good way to solve this problem ; but there are no user written functions in UF. So this code uses a ; stack and iteration to solve the problem. if (@bUnifyMergeFills && ((@enFillColor == "Gradient") || @bOOMask)) int iSTRow = 0 int iSTCol = 1 int iStack = -1 int rg_Stack[102*102,2] if (@iCRows > 31), int iEnd = 31, else, iEnd = @iCRows, endif if (@iCCols > 31), int jEnd = 31, else, jEnd = @iCCols, endif i = 1, j = 1, int iMerge=0 int iRowMin = 0, int iColMin = 0, int iRowMax = 0, int iColMax = 0 int iMRow = 0, int iMCol = 0 while (i <= iEnd) while (j <= jEnd) if ((rg_unified[i,j] <= 0) && (rg_b_cell_exceptions[i,j,iMR] || rg_b_cell_exceptions[i,j,iMD] \ || rg_b_cell_exceptions[i,j-1,iMR] || rg_b_cell_exceptions[i-1,j,iMD])) ; Find the first to be merged iRowMin = 32, iColMin = 32, iRowMax = 0, iColMax = 0 iMerge = iMerge+1 ; Each group of connected cells is marked with a different number iStack = iSTack+1 rg_Stack[iStack,iSTRow] = i rg_Stack[iStack,iSTCol] = j rg_unified[i,j] = iMerge while(iStack >= 0) ; Fills the stack with all connected cells and iMRow = rg_Stack[iStack, iSTRow] ; process the cells on the stack iMCol = rg_Stack[iStack, iSTCol] iStack = iStack - 1 if (iRowMin > iMRow), iRowMin = iMRow, endif if (iColMin > iMCol), iColMin = iMCol, endif if (iRowMax < iMRow), iRowMax = iMRow, endif if (iColMax < iMCol), iColMax = iMCol, endif if (rg_b_cell_exceptions[iMRow,iMCol,iMR] && (rg_unified[iMRow,iMCol+1] <= 0)) iStack = iStack+1 rg_Stack[iStack,iSTRow] = iMRow rg_Stack[iStack,iSTCol] = iMCol+1 rg_unified[iMRow,iMCol+1] = iMerge endif if (rg_b_cell_exceptions[iMRow,iMCol,iMD] && (rg_unified[iMRow+1,iMCol] <= 0)) iStack = iStack+1 rg_Stack[iStack,iSTRow] = iMRow+1 rg_Stack[iStack,iSTCol] = iMCol rg_unified[iMRow+1,iMCol] = iMerge endif if (rg_b_cell_exceptions[iMRow,iMCol-1,iMR] && (rg_unified[iMRow,iMCol-1] <= 0)) iStack = iStack+1 rg_Stack[iStack,iSTRow] = iMRow rg_Stack[iStack,iSTCol] = iMCol-1 rg_unified[iMRow,iMCol-1] = iMerge endif if (rg_b_cell_exceptions[iMRow-1,iMCol,iMD] && (rg_unified[iMRow-1,iMCol] <= 0)) iStack = iStack+1 rg_Stack[iStack,iSTRow] = iMRow-1 rg_Stack[iStack,iSTCol] = iMCol rg_unified[iMRow-1,iMCol] = iMerge endif endwhile ; Setup data for walk float fULX = rg_cell_def[iRowMin,iColMin,iULXHT] float fULY = rg_cell_def[iRowMin,iColMin,iULYHT] float fLRX = rg_cell_def[iRowMax,iColMax,iLRXHT] float fLRY = rg_cell_def[iRowMax,iColMax,iLRYHT] float fHDXT = (fLRX - fULX)/2 float fHDYT = (fULY - fLRY)/2 float fCXT = fULX + fHDXT float fCYT = fULY - fHDYT ; Walk the area just found to be merged. If the cells have are marked ; with the current number, set the cell definition to the far corners int k = iRowMin, int l = iColMin while (k <= iRowMax) while (l <= iColMax) if (rg_unified[k,l] == iMerge) rg_UseCenter[k,l,iUCRow] = iRowMin rg_UseCenter[k,l,iUCCol] = iColMin rg_cell_def[k,l,iULX] = fULX rg_cell_def[k,l,iULY] = fULY rg_cell_def[k,l,iLRX] = fLRX rg_cell_def[k,l,iLRY] = fLRY rg_cell_def[k,l,iHDX] = fHDXT rg_cell_def[k,l,iHDY] = fHDYT rg_cell_def[k,l,iCX] = fCXT rg_cell_def[k,l,iCY] = fCYT endif l = l+1 endwhile k = k+1 l = 1 endwhile endif j = j+1 endwhile i = i+1 j = 1 endwhile endif ; End stack processing of cells float fModOffset = 0.0 ; Get rid of the warning ;===================== ; Setup 'Scale' for block fills. Scale multiplied by the maximum value generated by ; the shape should be equal to or less than @fFillColorRange (ideally). There are ; many situations where this breaks down. float fRMax = 0.0 ; Get rid of warning i = 1 j = 1 while (i <= @iCRows) while (j <= @iCCols) ; if ((@enFillStyle == "Whole") || (@enFillStyle == "Whole Stepped")) ; float fFillWidth = fGridWidth - 2*fHalfGridline ; float fFillHeight = fGridHeight - 2*fHalfGridline ; else float fFillWidth = (rg_cell_def[i,j,iHDX]- fHalfGridline)*2 float fFillHeight = (rg_cell_def[i,j,iHDY]- fHalfGridline)*2 ; endif float fStrch = @fShapeStretchXY if (@bFollowAspect) fStrch = fStrch * fFillWidth/fFillHeight endif rg_cell_def[i,j,iSTRH] = fStrch float fA = fAngle % (#pi/2) float fD = sqrt((fFillWidth)^2 + (fFillHeight)^2) if (fA > #pi/4) rg_cell_def[i,j,iFLMAX] = fFillHeight + (fD-fFillHeight)* sin(fA*2) + (fFillHeight/25)*sin(fA*4) else rg_cell_def[i,j,iFLMAX] = fFillWidth + (fD-fFillWidth)* sin(fA*2) + (fFillWidth/25)*sin(fA*4) endif ; ---- Rectangle and Cross ---- if (( @enFillType == "Rectangle") || (@enFillType == "Cross")) if (fFillWidth > fFillHeight) rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge)/(fFillHeight/2) else rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge)/(fFillWidth/2) endif if (@bEqualBands) if (fStrch <= 1.0) rg_cell_def[i,j,iXREF] = fFillHeight/2 * fStrch rg_cell_def[i,j,iYREF] = fFillHeight/2 else rg_cell_def[i,j,iXREF] = fFillWidth/(2) rg_cell_def[i,j,iYREF] = fFillWidth/(2 * fStrch) endif endif ; ---- Ellipse ---- elseif ((@enFillType == "Ellipse")); && (@enFillStyle == "Normal")) if (fFillHeight > fFillWidth) rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge)/(fFillWidth/2*sqrt(2));(*fStrch) else rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge)/(fFillHeight/2*sqrt(2));*fStrch) endif if (@bEqualBands) if (fStrch <= 1.0) rg_cell_def[i,j,iXREF] = fFillHeight/(2 * fStrch) rg_cell_def[i,j,iYREF] = fFillHeight/2 else rg_cell_def[i,j,iXREF] = fFillWidth/(2) rg_cell_def[i,j,iYREF] = fFillWidth/2 * fStrch endif endif ; ---- Radial ---- elseif ((@enFillType == "Radial")) rg_cell_def[i,j,iFLSC] = @fFillColorRange/(#pi*2) ; ---- Linear Angle ---- elseif ((@enFillType == "Linear") || (@enFillType == "Symmetrical Linear")) float fMaxLFDist = 0 float fA = fAngle % (#pi/2) float fD = sqrt((fFillWidth)^2 + (fFillHeight)^2) if (fA < #pi/4) fMaxLFDist = fFillHeight + (fD-fFillHeight)* sin(fA*2) + (fFillHeight/25)*sin(fA*4) else fMaxLFDist = fFillWidth + (fD-fFillWidth)* sin(fA*2) + (fFillWidth/25)*sin(fA*4) endif rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge)/(fMaxLFDist) ; ---- Rounded Rect ---- elseif (@enfillType == "Rounded Rect Plus") if (fFillHeight > fFillWidth) rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge) \ / (abs(fFillWidth/2*@fStretchXY)^@fPower + abs(fFillWidth/2)^@fPower)^(1/@fPower) else rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge) \ / (abs(fFillHeight/2*@fStretchXY)^@fPower + abs(fFillHeight/2)^@fPower)^(1/@fPower) endif ; ---- Superformula Shapes ---- elseif (@enfillType == "Superformula Shapes") ; Figure out maximum and minimum r value (with some certainty) by running the formula ; at 1 degree angles through 360 degrees. float fInc = #pi/180 ; 360 tests float fRMin = 999999999 float fRMax = -999999999 float fEnd = #pi*2 while (fEnd > 0) float rT rT = (abs((cos(m * fEnd/4)/a)^n2) + ((abs(sin(m * fEnd/4)/b))^n3))^(-1.0/n1) if (rT > fRMax), fRMax = rT, endif if (rT < fRMin), fRMin = rT, endif fEnd = fEnd - fInc endwhile ; ------------- Stepped Random --------------- elseif ( @enFillType == "Random") ; ------------- Modulated --------------- elseif ((@enfillType == "Modulated 1") || (@enfillType == "Modulated 2") || (@enfillType == "Modulated 3")) float fModOffset = (@fFillColorRange - fColorNudge) / (@iMod*2) rg_cell_def[i,j,iFLSC] = (@fFillColorRange - fColorNudge) / (@iMod) endif j = j+1 endwhile i = i + 1 j = 1 endwhile ; End of setting up scale for fills int iOOMask = 0 ; The value associated with the cell(s) masked in/out if (@bOOMask) iOOMask = rg_unified[@iRowOpening, @iColOpening] endif ; ------ End of global section -------- init: ; Section empty loop: ; Section empty ; ==================================================== ; ==================================================== ; F i n a l ; ==================================================== ; ==================================================== final: float x = real(#pixel) float y = imag(#pixel) ; For distance from edges float fDist1 float fDist2 float fDist ;---- ; Deal with color/solid/gradients on the frames ;---- ; On one of the frames or beyond all frames. if ((x <= fX1) ||(x >= fX2) || (y >= fY1) || (Y <= fY2)) ; Beyond all frames if (@bOOMask && (@enOOMType=="Mask-In Cell")) ; Everything solid if masking in a cell #solid = true else if ((x < fXBeyond1) ||(x >= fXBeyond2) \ || (y > fYBeyond1) || (Y <= fYBeyond2)) if (@bSolidBeyond) #solid = true else #solid = false #index = fOuterFrameColor endif ; On the outside frame elseif (((x <= fXOuter1) ||(x >= fXOuter2) || (y >= fYOuter1) || (Y <= fYOuter2))) if (@enOuterColor == "Single" && (@fFrameThick > 0)) #solid = false #index = fOuterFrameColor elseif (@enOuterColor == "Solid") #solid = true else ; Figure out if closer to top/bottom or sides fDist1 = fHalfImageWidth - abs(x - fXCenter) fDist2 = fHalfImageHeight - abs(y - fYCenter) if (fDist1 > fDist2) #index = fDist2 * fOutsideGradScale + fOutsideGradBase else #index = fDist1 * fOutsideGradScale + fOutsideGradBase endif endif else fDist1 = fHalfImageWidth - abs(x - fXCenter) fDist2 = fHalfImageHeight - abs(y - fYCenter) if (fDist1 > fDist2) #index = fDist2 * fOutsideGradScale + fOutsideGradBase else #index = fDist1 * fOutsideGradScale + fOutsideGradBase endif if (@enInnerColor == "Single" && (@fInnerFrameThick > 0)) #solid = false #index = fInnerFrameColor elseif (@enInnerColor == "Solid") #solid = true else ; enInnerColor == 2 fDist1 = fHalfOuterWidth - abs(x - fXCenter) fDist2 = fHalfOuterHeight - abs(y - fYCenter) if (fDist1 > fDist2) fDist = fDist2 else fDist = fDist1 endif #index = fDist * fInsideGradScale + fInsideGradBase endif endif ; Processing frames endif else ; ------- Inside of all frames ------- int iRow = 1 int iCol = 1 while (iRow <= @iCRows) while (iCol <= @iCCols) bool bGridline= false ; true iff we are painting gridlines bool bNoFlip = false ; True if inside specific cell if ( (x >= rg_cell_def[iRow,iCol,iULXHT]) && (x <= rg_cell_def[iRow,iCol,iLRXHT]) \ && (y <= rg_cell_def[iRow,iCol,iULYHT]) && (y >= rg_cell_def[iRow,iCol,iLRYHT])) int iColorType = rg_i_cell_color[iRow,iCol] ; Start with the cell fill if (@bOOMask && (@enOOMType=="Mask-In Cell") && ((rg_unified[iRow,iCol] != iOOMask) \ || ((rg_unified[iRow,iCol] == iOOMask) && (rg_i_cell_color[iRow,iCol] == iTCSolid)))) if (rg_unified[iRow,iCol] == iOOMask) iColorType = iTCSingle else iColorType =iTCSolid endif endif if (false) else ; !bOOMask && Mask-In ; ------------- Process left gridline ----------------------------- if (((x - rg_cell_def[iRow,iCol,iULXHT]) <= fHalfGridline)) bGridline = true if ((@enGridlineColor == "Solid") || (@fGridThickness < .00001) || (@bOOMask && (@enOOMType=="Mask-In Cell"))) iColorType = iTCSolid elseif (@enGridlineColor == "Gradient") iColorType = iTCGradient else iColorType = iTCSingle endif ; If exception, flip state if (rg_b_cell_exceptions[iRow,iCol-1,iMR]);&& !@bUnifyMergeFills) iColorType = iTCFill endif endif ; ------------- Process right gridline ----------------------------- if (((rg_cell_def[iRow,iCol,iLRXHT]-x) <= fHalfGridline)) bGridline = true if ((@enGridlineColor == "Solid") || (@fGridThickness < .00001) || (@bOOMask && (@enOOMType=="Mask-In Cell"))) iColorType = iTCSolid elseif (@enGridlineColor == "Gradient") iColorType = iTCGradient else iColorType = iTCSingle endif ; If exception, flip state if ((rg_b_cell_exceptions[iRow,iCol,iMR])); && !@bUnifyMergeFills) iColorType = iTCFill endif endif ; ------------- Process bottom gridline -------------------- if ((y-(rg_cell_def[iRow,iCol,iLRYHT]) <= fHalfGridline)) bGridline = true if ((@enGridlineColor == "Solid") || (@fGridThickness < .00001) || (@bOOMask && (@enOOMType=="Mask-In Cell"))) iColorType = iTCSolid elseif (@enGridlineColor == "Gradient") iColorType = iTCGradient else iColorType = iTCSingle endif ; If exception, flip state but not at the corners if there are ; any other lines coming in ; Bottom right corner if (rg_b_cell_exceptions[iRow,iCol,iMD]); && !@bUnifyMergeFills) ; Special case if ( (x <= rg_cell_def[iRow,iCol,iLRXHT]) \ && (x >= rg_cell_def[iRow,iCol,iLRXHT]-fHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iLRYHT]+FHalfGridline) \ && (y >= rg_cell_def[iRow,iCol,iLRYHT])) if ( !rg_b_cell_exceptions[iRow,iCol,iMR] \ || !rg_b_cell_exceptions[iRow,iCol+1,iMD] \ || !rg_b_cell_exceptions[iRow+1,iCol,iMR]) bNoFlip=true endif endif ; Bottom left corner if ( (x >= rg_cell_def[iRow,iCol,iULXHT]) \ && (x <= rg_cell_def[iRow,iCol,iULXHT]+fHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iLRYHT]+FHalfGridline) \ && (y >= rg_cell_def[iRow,iCol,iLRYHT])) if ( !rg_b_cell_exceptions[iRow,iCol,iMD] \ || !rg_b_cell_exceptions[iRow,iCol-1,iMR] \ || !rg_b_cell_exceptions[iRow,iCol-1,iMD] \ || !rg_b_cell_exceptions[iRow+1,iCol-1,iMR]) bNoFlip=true endif endif if (!bNoFlip) iColorType = iTCFill endif endif endif ; Process bottom gridline ; ------------- Process top gridline ----------------------------- if (((rg_cell_def[iRow,iCol,iULYHT]-y) <= fHalfGridline)) bGridline = true if ((@enGridlineColor == "Solid") || (@fGridThickness < .00001) || (@bOOMask && (@enOOMType=="Mask-In Cell"))) iColorType = iTCSolid elseif (@enGridlineColor == "Gradient") iColorType = iTCGradient else iColorType = iTCSingle endif ; If exception, flip state ; but not at the corners if there are ; any other lines coming in if (rg_b_cell_exceptions[iRow-1,iCol,iMD]) ; Special case ; Top right corner if ( (x <= rg_cell_def[iRow,iCol,iLRXHT]) \ && (x >= rg_cell_def[iRow,iCol,iLRXHT]-fHalfGridline) \ && (y >=rg_cell_def[iRow,iCol,iULYHT]-FHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iULYHT])) if ( !rg_b_cell_exceptions[iRow,iCol,iMR] \ || !rg_b_cell_exceptions[iRow-1,iCol,iMR] \ || !rg_b_cell_exceptions[iRow-1,iCol+1,iMD]) bNoFlip=true endif endif ;Top left corner if ( (x >= rg_cell_def[iRow,iCol,iULXHT]) \ && (x <= rg_cell_def[iRow,iCol,iULXHT]+fHalfGridline) \ && (y >=rg_cell_def[iRow,iCol,iULYHT]-FHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iULYHT])) if ( !rg_b_cell_exceptions[iRow,iCol-1,iMR]) \ || !rg_b_cell_exceptions[iRow-1,iCol-1,iMR] \ || !rg_b_cell_exceptions[iRow-1,iCol-1,iMD] bNoFlip=true endif endif if (!bNoFlip) iColorType = iTCFill endif endif endif ; Process top gridline endif ; end else == !bOOMask ; ------------ Setup pixel color --------------- if (bGridline && @bOOMask && (@enOOMType=="Mask-In Cell") && (rg_unified[iRow,iCol] != iOOMask)) #solid = true elseif (iColorType == iTCSolid) #solid = true elseif (iColorType == iTCFill) ; Merged Gridlines try to follow block fills bGridline = true iColorType = rg_i_cell_color[iRow,iCol] if (rg_i_cell_color[iRow,iCol] == iTCGradient) #index = fEndFillColor bGridline = false elseif (rg_i_cell_color[iRow,iCol] == iTCSingle) #index = fFillColor bGridline = false else ; Solid if (@bOOMask && (@enOOMType=="Mask-In Cell") && (rg_unified[iRow,iCol] == iOOMask)) #index = fFillColor else #solid = true endif endif elseif (iColorType == iTCSingle) #solid = false if (bGridline) #index = fGridColor else #index = fFillColor endif elseif (iColorType == iTCFill) bGridline = false ; Pass on to else ; --- Gradient gridline fills ----- #solid = false if (bGridline) fDist1 = rg_cell_def[iRow,iCol,iHDXHT] - abs(x - rg_cell_def[iRow,iCol,iCXHT]) fDist2 = rg_cell_def[iRow,iCol,iHDYHT] - abs(y - rg_cell_def[iRow,iCol,iCYHT]) ; ------------ Process the cell connections with lines missing ------------ ; With gradient fills and missing gridlines, the fills need to be ; changed to remove stubs and add corners if (bMergedCells) ; Bottom right corner if ( (x <= rg_cell_def[iRow,iCol,iLRXHT]) \ && (x >= rg_cell_def[iRow,iCol,iLRXHT]-fHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iLRYHT]+FHalfGridline) \ && (y >= rg_cell_def[iRow,iCol,iLRYHT])) if ( rg_b_cell_exceptions[iRow,iCol,iMR] \ && !rg_b_cell_exceptions[iRow,iCol,iMD] ) ; Horizontal(s), no vertical fDist1 = fLargeNumber endif if (rg_b_cell_exceptions[iRow,iCol,iMD] \ && !rg_b_cell_exceptions[iRow,iCol,iMR] ) ; Vertical(s), no horizontal fDist2 = fLargeNumber endif if (rg_b_cell_exceptions[iRow,iCol,iMR] \ && rg_b_cell_exceptions[iRow,iCol,iMD] ) ; Corner down and to the right if ((fHalfGridline - fDist1) > (fHalfGridline - fDist2)) fDist1 = fLargeNumber else fDist2 = fLargeNumber endif endif endif ; Bottom left corner if ( (x >= rg_cell_def[iRow,iCol,iULXHT]) \ && (x <= rg_cell_def[iRow,iCol,iULXHT]+fHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iLRYHT]+FHalfGridline) \ && (y >= rg_cell_def[iRow,iCol,iLRYHT])) if ( rg_b_cell_exceptions[iRow,iCol-1,iMR] \ && !rg_b_cell_exceptions[iRow,iCol ,iMD] ) ; Horizontal(s), no vertical fDist1 = fLargeNumber endif if (rg_b_cell_exceptions[iRow,iCol ,iMD] \ && !rg_b_cell_exceptions[iRow,iCol-1,iMR] ) ; Vertical(s), no horizontal fDist2 = fLargeNumber endif if (rg_b_cell_exceptions[iRow,iCol ,iMD] \ && rg_b_cell_exceptions[iRow,iCol-1,iMR] ) ; Corner down and to the left if ((fHalfGridline - fDist1) > (fHalfGridline - fDist2)) fDist1 = fLargeNumber else fDist2 = fLargeNumber endif endif endif ; Top right corner if ( (x <= rg_cell_def[iRow,iCol,iLRXHT]) \ && (x >= rg_cell_def[iRow,iCol,iLRXHT]-fHalfGridline) \ && (y >=rg_cell_def[iRow,iCol,iULYHT]-FHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iULYHT])) if (rg_b_cell_exceptions[iRow,iCol,iMR] \ && !rg_b_cell_exceptions[iRow-1,iCol,iMD] ) ; horizontal(s), no vertical fDist1 = fLargeNumber endif if (rg_b_cell_exceptions[iRow-1,iCol,iMD] \ && !rg_b_cell_exceptions[iRow,iCol,iMR] ) ; Vertical(s), no horizontal fDist2 = fLargeNumber endif if (rg_b_cell_exceptions[iRow ,iCol ,0 ] \ && rg_b_cell_exceptions[iRow-1,iCol ,iMD] ) ; Corner up and to the right if ((fHalfGridline - fDist1) > (fHalfGridline - fDist2)) fDist1 = fLargeNumber else fDist2 = fLargeNumber endif endif endif ; Top left corner if ( (x >= rg_cell_def[iRow,iCol,iULXHT]) \ && (x <= rg_cell_def[iRow,iCol,iULXHT]+fHalfGridline) \ && (y >=rg_cell_def[iRow,iCol,iULYHT]-FHalfGridline) \ && (y <= rg_cell_def[iRow,iCol,iULYHT])) if ( rg_b_cell_exceptions[iRow,iCol-1,iMR] \ && !rg_b_cell_exceptions[iRow-1,iCol,iMD] ) ; Horizontal(s), no vertical fDist1 = fLargeNumber endif if (rg_b_cell_exceptions[iRow-1,iCol,iMD] \ && !rg_b_cell_exceptions[iRow ,iCol-1,iMR] ) ; Vertical(s), no horizontal fDist2 = fLargeNumber endif if (rg_b_cell_exceptions[iRow-1,iCol ,iMD] \ && rg_b_cell_exceptions[iRow ,iCol-1 ,iMR] ) ; Corner up and to the right if ((fHalfGridline - fDist1) > (fHalfGridline - fDist2)) fDist1 = fLargeNumber else fDist2 = fLargeNumber endif endif endif endif ; ------- End handling of fills of with missing lines ------ if (fDist1 > fDist2) float t = fDist2 * fGridGradScale + fGridGradBase #index = t - floor(t) else t = fDist1 * fGridGradScale + fGridGradBase #index = t - floor(t) endif endif ; if (bGridline) endif ; Gradient ; -------------- Block Fills ------------------ if (!bGridline) #solid = false float fX=x, float fY=y if ((iColorType == iTCSolid) || (@bOOMask && (@enOOMType=="Mask-Out Cell") && (rg_unified[iRow,iCol] == iOOMask))) #solid = true elseif (iColorType == iTCSingle) #index = fFillColor else ; Gradient fill float fXFillCenter = 0, float fYFillCenter = 0, float fHalfFillWidth = 0, float fHalfFillHeight = 0 bool bUseY = false, float fLocalStretch = rg_cell_def[iRow,iCol,iSTRH] if (( (@enFillType == "Ellipse") || (@enFillType == "Rounded Rect Plus") \ || (@enFillType == "Cross") || (@enFillType == "Rectangle") \ || (@enFillType == "Superformula Shapes") || (@enFillType== "Linear") \ || (@enFillType == "Symmetrical Linear") || (@enFillType== "Radial"))) if (@bStepped) fX = rg_cell_def[iRow,iCol,iCXHT] fY = rg_cell_def[iRow,iCol,iCYHT] else fX = x fY = y endif if (@bRelativeOffset) fXFillCenter = rg_cell_def[iRow,iCol,iCX] + (fOffsetX * rg_cell_def[iRow,iCol,iHDX]/rg_cell_def[iRow,iCol,iHDXHT]) fYFillCenter = rg_cell_def[iRow,iCol,iCY] + (fOffsetY * rg_cell_def[iRow,iCol,iHDY]/rg_cell_def[iRow,iCol,iHDYHT]) else fXFillCenter = rg_cell_def[iRow,iCol,iCX] + fOffsetX fYFillCenter = rg_cell_def[iRow,iCol,iCY] + fOffsetY endif fHalfFillWidth = rg_cell_def[iRow,iCol,iHDX]- fHalfGridline fHalfFillHeight = rg_cell_def[iRow,iCol,iHDY]- fHalfGridline bUseY = (fLocalStretch <= 1.0) endif float fLocalAngle = @fCellRotation/180*#pi if (fLocalAngle < 0), fLocalAngle = fLocalAngle+#pi*2, endif ;--- Angle Clipping --- float fXC = fX - fXFillCenter ; X and Y adjusted for shape/fill center float fYC = fY - fYFillCenter if ((@fAngleToClip > 0.1) && !@bStepped) float fClipRef = @fAngleClipRef/180*#pi if (fClipRef < 0), fClipRef = fClipRef + 2*#pi, endif float fTheta = atan(((fYC-imag(@cAngleClipOffset))/(fXC-real(@cAngleClipOffset)))) if (fTheta < 0), fTheta = fTheta + #pi, endif if ((fYC-imag(@cAngleClipOffset)) < 0), fTheta = fTheta + #pi, endif if (abs(fTheta-fClipRef) <= @fAngleToClip/180*#pi/2) #solid = true endif fClipRef = fClipRef+#pi*2 if (abs(fTheta-fClipRef) <= @fAngleToClip/180*#pi/2) #solid = true endif endif ;------ Rotation for some shapes ---------- if ((@fCellRotation < -0.01) || (@fCellRotation > 0.01)) if ( (@enFillType == "Ellipse") || (@enFillType == "Rounded Rect Plus") \ || (@enFillType == "Cross") || (@enFillType == "Rectangle") \ || (@enFilltype == "Symmetrical Linear")) fX = fX - fXFillCenter fY = fY - fYFillCenter ; Rotate - I'm sure there is a better way to do this ; rotation, but the simpler ways I tried had issues. ; Go to polar coord's and back float fTheta = atan2(fX + flip(fY)) if (fTheta < 0), fTheta = fTheta + 2*#pi, endif float r = sqrt(fX^2 + fY^2) fTheta = fTheta - fLocalAngle fX = r * cos(fTheta) fY = r * sin(fTheta) ;Translate back fX = fX + fXFillCenter fY = fY + fYFillCenter endif endif fXC = fX - fXFillCenter ; Set them again after the rotation fYC = fY - fYFillCenter float fIndex = 0.0 ; Initialize to get rid of 'might not be initialized' warning ;---------Rectangular fills -------------- if (@bEqualBands && (@enFillType == "Rectangle")) if (fLocalStretch <= 1.0) float fDX = rg_cell_def[iRow,iCol,iXREF] - (rg_cell_def[iRow,iCol,iYREF] - abs(fYC)) float fDY = abs(fYC) if (fDX < 0.0), fDX = 0.0, endif if (fDY == 0), fDY = 0.00000000001, endif fLocalStretch = fDX/fDY else fDY = rg_cell_def[iRow,iCol,iYREF] - (rg_cell_def[iRow,iCol,iXREF] - abs(fXC)) fDX = abs(fXC) if (fDX == 0), fDX = 0.00000000001, endif if (fDY < 0.0), fDY = 0.0, endif fLocalStretch = fDX/fDY endif endif if ( (@enFillType == "Rectangle") || (@enFillType == "Cross")) if (bUseY) float fDist1 = abs(fXC) float fDist2 = abs(fYC)*fLocalStretch else float fDist1 = abs(fXC)/fLocalStretch float fDist2 = abs(fYC) endif if (@enFillType == "Rectangle") if (fDist1 > fDist2) fIndex = fDist1 * rg_cell_def[iRow,iCol,iFLSC] else fIndex = fDist2 * rg_cell_def[iRow,iCol,iFLSC] endif else ; Cross if (fDist1 > fDist2) fIndex = fDist2 * rg_cell_def[iRow,iCol,iFLSC] else fIndex = fDist1 * rg_cell_def[iRow,iCol,iFLSC] endif endif ; ------------ Ellipse -------------------- elseif (@enFillType == "Ellipse") if (@bEqualBands) if (fLocalStretch <= 1.0) float z = sqrt(((fXC)/fLocalStretch)^2 + (fYC)^2) float fDX = rg_cell_def[iRow,iCol,iXREF] - (rg_cell_def[iRow,iCol,iYREF] - z) float fDY = z if (fDX < 0.0), fDX = 0.0, endif if (fDX == 0), fDX = 0.00000000001, endif fLocalStretch = fDY/fDX else z = sqrt(((fXC))^2 + ((fYC)*fLocalStretch)^2) fDY = rg_cell_def[iRow,iCol,iYREF] - (rg_cell_def[iRow,iCol,iXREF] - z) fDX = z if (fDX == 0), fDX = 0.00000000001, endif if (fDY < 0.0), fDY = 0.0, endif fLocalStretch = fDY/fDX endif endif if (bUseY) fDist1 = sqrt(sqr(fXC) + sqr((fYC)*fLocalStretch)) else fDist1 = sqrt(sqr((fXC)/fLocalStretch) + sqr(fYC)) endif fIndex = fDist1 * rg_cell_def[iRow,iCol,iFLSC] ; --------------------- Radial Fill --------------- elseif (@enFillType == "Radial") if (bUseY) float fTh = atan2(fXC + flip(fYC*fLocalStretch)) else fTh = atan2(fXC/fLocalStretch + flip(fYC)) endif fTh = fTh + fLocalAngle if (fTh < 0), fTH = fTH+#pi*2, endif fTh = fTh % (2*#pi) fIndex = fth * rg_cell_def[iRow,iCol,iFLSC] ; --------------------- Random Fill --------------- elseif (@enFillType == "Random") ; Random fill fIndex = abs(random(@iSeedBlock*(rg_UseCenter[iRow,iCol,iUCRow]+1001)*rg_UseCenter[iRow,iCol,iUCCol])) \ / #randomrange * @fFillColorRange ; --------------------- Linear Fill --------------- elseif (@enFilltype == "Linear") ; Linear Angle ; These linear fills rotate around around each corner ; of the block...one corner for each 1/4 of a rotation. ; A line is passes through a corner at the angle (mod pi/2) ; Another line is projected streight from the point up/across ; to the angled line. Calculation of the lenght of the ; projected line comes in two parts...the part inside the ; block, and the part outside the block. The distance ; is calculated using a triangle with verticies (1) the ; point we are calculating, (2) the point where the ; streight up line intersects the angled corner line and (3) ; the a line from the point to the shortest distance to the ; angled line. All this work is so the linear gradient starts ; and ends approximately at the edges of the block (and to ; avoid trig functions in the inner loop.) float dy1 = 0, float dy2 = 0 if (fAngle >= 3/2*#pi) float dx1 = rg_cell_def[iRow,iCol,iLRX] - fX float dy1 = fY - rg_cell_def[iRow,iCol,iLRY] float dy2 = fTanAngle * dx1 fDist1 = fCosAngle * (dy1 + dy2) elseif (fAngle >= #pi) float dy1 = fY - rg_cell_def[iRow,iCol,iLRY] float dx1 = fX - rg_cell_def[iRow,iCol,iULX] float dx2 = fTanAngle * dy1 fDist1 = fCosAngle * (dx1 + dx2) elseif (fAngle >= #pi/2) float dy1 = rg_cell_def[iRow,iCol,iULY] - fY float dx1 = fX - rg_cell_def[iRow,iCol,iULX] float dy2 = fTanAngle * dx1 fDist1 = fCosAngle * (dy1 + dy2) else float dx1 = rg_cell_def[iRow,iCol,iLRX] - fX float dy1 = rg_cell_def[iRow,iCol,iULY] - fY float dx2 = fTanAngle * dy1 fDist1 = fCosAngle * (dx1 + dx2) endif fIndex = fDist1 * rg_cell_def[iRow,iCol,iFLSC] ;---------------------------- Symmetrical Linear ------------------------------ elseif (@enFilltype == "Symmetrical Linear") fDist1 = abs(fYC) fIndex = fDist1 * rg_cell_def[iRow,iCol,iFLSC]*2 ;---------------------------- Rounded Rect Fill ------------------------------ elseif (@enFilltype == "Rounded Rect Plus") if (bUseY) findex = (abs((fYC)*fLocalStretch)^@fPower \ + abs(fXC)^@fPower)^(1/@fPower) else findex = (abs((fYC))^@fPower \ + abs((fXC)/fLocalStretch)^@fPower)^(1/@fPower) endif findex = fIndex * rg_cell_def[iRow,iCol,iFLSC] ;--------------------------Superformula Gradient ------------------- elseif (@enFillType == "Superformula Shapes") float fTheta = atan2(fXC + flip(FYC)) if (bUseY) float fPointDist = sqrt((fXC)^2 + ((fYC)*fLocalStretch)^2) else fPointDist = sqrt((fXC/fLocalStretch)^2 + fYC^2) endif fTheta = fTheta + fLocalAngle*s float fMaxDist if (fHalfFillWidth < fHalfFillHeight) fMaxDist = fHalfFillWidth * sqrt(2) else fMaxDist = fHalfFillHeight * sqrt(2) endif float rTT float r = -999999999 int iTT = 1 while (iTT <= s) iTT = iTT+1 rTT = (abs((cos(m * fTheta/4)/a)^n2) + ((abs(sin(m * fTheta/4)/b))^n3))^(-1/n1) if (rTT > r), r = rTT, endif fTheta = fTheta + 2*#pi endwhile ; fIndex = (fPointDist * fRMax)/(r*fMaxDist*1.1)/@fShapeScale fIndex = fPointDist/((r)*(fMaxDist/fRMax)) fIndex = fIndex * @fFillColorRange ; ---------------------- Modulated fills -------------- elseif (@enFilltype == "Modulated 1") ; Modulated 1 fIndex = rg_cell_def[iRow,iCol,iFLSC] * (((rg_UseCenter[iRow,iCol,iUCRow]-1) + (rg_UseCenter[iRow,iCol,iUCCol]-1)) % @iMod) + fModOffset elseif (@enFilltype == "Modulated 2") ; Modulated 2 fIndex = rg_cell_def[iRow,iCol,iFLSC] * (((rg_UseCenter[iRow,iCol,iUCRow]-1)*@iCCols + (rg_UseCenter[iRow,iCol,iUCCol]-1)) % @iMod) + fModOffset elseif (@enFilltype == "Modulated 3") ; Modulated 3 fIndex = rg_cell_def[iRow,iCol,iFLSC] * (((rg_UseCenter[iRow,iCol,iUCRow]-1) + (rg_UseCenter[iRow,iCol,iUCCol]-1)*@iCRows) % @iMod) + fModOffset endif ; Find the color fIndex = fIndex*@fFillColorScale if (fHalfFillWidth > fHalfFillHeight) fIndex = fIndex * (1+(1 - fHalfFillWidth/fHalfFillHeight)* @fAspectColorScale) else fIndex = fIndex * (1+(1 - fHalfFillHeight/fHalfFillWidth)* @fAspectColorScale) endif ; Make sure color is within the range if (fIndex < 0), fIndex = 0, endif ; Shouldn't happen if (@bRepeatGradient) fIndex = fIndex % @fFillColorRange else if (fIndex > @fFillColorRange-fColorNudge) fIndex = @fFillColorRange-fColorNudge endif endif ; Clip the color if ((@fInsideClip > 0.01) || (@fOutsideClip > 0.01)) if ( (fIndex < (@fInsideClip)) \ || (fIndex > (@fFillColorRange - @fOutsideClip))) #solid = true endif endif ; Add the base/startpoint on the gradient fIndex = fIndex + fFillGradBase fIndex = fIndex - floor(fIndex) ; Wrap if > 1.0 #index = fIndex endif ; End Gradient block fills endif ; End of block fills (!bGridline) iRow = 1000 ; We found the cell, so bail out of this puppy iCol = 1000 endif ; Inside specific cell iCol = iCol+1 endwhile ; Column loop iRow = iRow+1 iCol = 1 endwhile ; Row loop endif ; ========================= ; default ; ========================== default: $ifdef FULL_VERSION title = "Matting and Framing" $else title = "Matting and Framing Lite" $endif heading caption="General Parameters" endheading param enBAorE caption = "Mode" enum = "Basic" "Advanced" "Expert" hint = "Maximum merging and filling of 7 x 7 in 'Advanced' mode and 31 x 31 \ in 'Expert' mode." endparam bool param bUseCenter caption = "Use Screen Center" default = true hint = "When 'Use Screen Center' is turned off, the frame is centered \ around 0,0." visible = @enBAorE != "Basic" endparam bool param bConstMag caption = "Constant Magnification" default = true visible = @enBAorE != "Basic" hint = "Prevents zooming or changing magnification when turned on." endparam bool param bSolidBeyond caption = "Solid Outside of Frames" default = false visible = (@bConstMag == false) || (@bUseCenter == false) hint = "Sets the area beyond the outer frame to solid." endparam int param iCRows caption = "Rows" default = 3 min = 1 max = 100 hint = "Maximum of 100 rows." endparam int param iCCols caption = "Columns" default = 3 min = 1 max = 100 hint = "Maximum of 100 columns." endparam float param fFrameThick caption = "Outer Frame Size" Default = 12.0 hint = "Typical values range from 1 - 50." endparam float param fInnerFrameThick caption = "Inner Frame Size" Default = 3.0 min = 0.0 hint="Typical values range from 1 - 10." endparam float param fGridThickness caption = "Gridline thickness" Default = 3.0 hint = "Typical values range from 1 - 25." endparam float param fStretchXY caption = "Stretch (X/Y)" default = 1.0 hint = "Changes the aspect of the outer frame without stretching the \ inner frame and gridlines. Turn off 'Constant Magnification' \ and zoom the window to set the framing." visible = @enBAorE != "Basic" endparam heading caption = "Color Parameters Help" visible = (@enBAorE != "Basic") expanded = false text = "For predictable results, set the UF parameters as follows: On the Outside tab \ set Color Density to '1,' and the Transfer Function to 'Linear.' In \ the gradient window, set the Rotation to '0.' With these settings, each element \ will have its own section of the gradient. The Outside Frame will be colored using \ gradient positions 0 - 99; Inside Frame positions 100 - 199; Gridlines positions \ 200 - 299; Block/Cell positions 300 - 399. When use 'Single' \ coloring, the color is taken from the midpoint of each range; positons 50, 150, \ 250, and 350." endheading heading caption = "Color/Fill: Inner and Outer Frame" visible = @enBAorE != "Basic" expanded = false endheading param enOuterColor caption = "Outer Frame Color" enum ="Single" "Solid" "Gradient" visible = @enBAorE != "Basic" hint = "Coloring modes for the outside frame." endparam float param fOuterColorRot caption = "Outer Color Rotation" min = 0.0 max = 1.0 default = 0.0 visible = (@enBAorE != "Basic") hint = "Changes the position on the gradient where gradient coloring begins \ or where the single color is set. Positions range from 0 - 1 and represent \ a fraction of the gradient. The gradient window has 400 positions, so a \ value of 0.25 specifies the coloring to begin at position 100." endparam float param fOuterColorRange caption = "Outer Color Range" min = 0.01 max = 1.00 default = 0.25 visible = (@enBAorE != "Basic") hint = "Specifies the fraction of the gradient to use with gradient coloring." endparam param enInnerColor caption = "Inner Frame Color" enum = "Single" "Solid" "Gradient" visible = @enBAorE != "Basic" hint = "Coloring modes for the inside frame." endparam float param fInnerColorRot default = 0.25 caption = "Inner Color Rotation" min = 0.0 max = 1.0 visible = @enBAorE != "Basic" hint = "Changes the position on the gradient where gradient coloring begins \ or where the single color is set." endparam float param fInnerColorRange caption = "Inner Color Range" min = 0.01 max = 1.0 default = 0.25 visible = @enBAorE != "Basic" hint = "Specifies the fraction of the gradient to use with gradient coloring." endparam heading caption = "Color/Fill: Gridlines" visible = @enBAorE != "Basic" expanded = false endheading param enGridlineColor caption = "Gridline Color" enum = "Single" "Solid" "Gradient" visible = @enBAorE != "Basic" hint = "Coloring modes for the gridlines." endparam float param fGridlineColorRot caption = "Gridline Color Rotation" min = 0.0 max = 1.0 default = 0.5 visible = (@enBAorE != "Basic") hint = "Changes the position on the gradient where gradient coloring begins \ or where the single color is set." endparam float param fGridlineColorRange caption = "Gridline Color Range" min = 0.01 max = 1.0 default = 0.25 visible = @enBAorE != "Basic" hint ="Specifies the fraction of the gradient to use with gradient coloring." endparam heading caption = " Merging cells (removing Gridlines)" visible = @enBAorE != "Basic" endheading heading caption =" Merge Range of Cells" visible = @enBAorE != "Basic" expanded = false endheading ;---- Merge Range 1 -------- bool param bMrgRng1 caption ="Show/Hide Merge Range #1" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false ; visible = @enBAorE != "Basic" endparam param enMrgRng1 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = @bMrgRng1 endparam int param iSRM1 caption = "Start Row" min = 1 max = 100 visible = @bMrgRng1 endparam int param iSCM1 caption = "Start Column" min = 1 max = 100 visible = @bMrgRng1 endparam int param iERM1 caption ="End Row" min = 1 max = 100 visible = @bMrgRng1 endparam int param iECM1 caption = "End Column" min = 1 max = 100 visible = @bMrgRng1 endparam ;---- Merge Range 2 bool param bMrgRng2 caption ="Show/Hide Merge Range #2" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false ; visible = @enBAorE != "Basic" endparam param enMrgRng2 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = @bMrgRng2 endparam int param iSRM2 caption = "Start Row" min = 1 max = 100 visible = @bMrgRng2 endparam int param iSCM2 caption = "Start Column" min = 1 max = 100 visible = @bMrgRng2 endparam int param iERM2 caption ="End Row" min = 1 max = 100 visible = @bMrgRng2 endparam int param iECM2 caption = "End Column" min = 1 max = 100 visible = @bMrgRng2 endparam ;---- Merge Range 3 bool param bMrgRng3 caption ="Show/Hide Merge Range #3" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false ; visible = @enBAorE != "Basic" endparam param enMrgRng3 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = @bMrgRng3 endparam int param iSRM3 caption = "Start Row" min = 1 max = 100 visible = @bMrgRng3 endparam int param iSCM3 caption = "Start Column" min = 1 max = 100 visible = @bMrgRng3 endparam int param iERM3 caption ="End Row" min = 1 max = 100 visible = @bMrgRng3 endparam int param iECM3 caption = "End Column" min = 1 max = 100 visible = @bMrgRng3 endparam ;---- Merge Range 4 bool param bMrgRng4 caption ="Show/Hide Merge Range #4" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false ; visible = @enBAorE != "Basic" endparam param enMrgRng4 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = @bMrgRng4 endparam int param iSRM4 caption = "Start Row" min = 1 max = 100 visible = @bMrgRng4 endparam int param iSCM4 caption = "Start Column" min = 1 max = 100 visible = @bMrgRng4 endparam int param iERM4 caption ="End Row" min = 1 max = 100 visible = @bMrgRng4 endparam int param iECM4 caption = "End Column" min = 1 max = 100 visible = @bMrgRng4 endparam ;---- Merge Range 5 bool param bMrgRng5 caption ="Show/Hide Merge Range #5" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false visible = @enBAorE != "Basic" endparam param enMrgRng5 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iSRM5 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iSCM5 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iERM5 caption ="End Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iECM5 caption = "End Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam ;---- Merge Range 6 bool param bMrgRng6 caption ="Show/Hide Merge Range #6" Hint = "When enabled, the specified range is filled as a single cell." default = false visible = @enBAorE != "Basic" endparam param enMrgRng6 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iSRM6 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng6) endparam int param iSCM6 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng6) endparam int param iERM6 caption ="End Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng6) endparam int param iECM6 caption = "End Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng6) endparam ;---- Merge Range 7 bool param bMrgRng7 caption ="Show/Hide Merge Range #7" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false visible = @enBAorE != "Basic" endparam param enMrgRng7 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iSRM7 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng7) endparam int param iSCM7 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng7) endparam int param iERM7 caption ="End Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng7) endparam int param iECM7 caption = "End Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng7) endparam ;---- Merge Range 8 bool param bMrgRng8 caption ="Show/Hide Merge Range #8" Hint = "Gridlines are removed from the specified Range. \ Parameters are still active when settings are hidden." default = false visible = @enBAorE != "Basic" endparam param enMrgRng8 caption = "Merge Mode" enum = "Remove Gridlines" "Restore Gridlines" "Restore Rectangle" visible = ((@enBAorE != "Basic") && @bMrgRng5) endparam int param iSRM8 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng8) endparam int param iSCM8 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng8) endparam int param iERM8 caption ="End Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng8) endparam int param iECM8 caption = "End Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bMrgRng8) endparam ;--- $ifdef FULL_VERSION heading caption =" Merge Individual Cells" visible = @enBAorE != "Basic" expanded = true endheading heading caption =" Merge cells right" visible = @enBAorE != "Basic" expanded = false endheading ; ; Advanced Merge Right Parameters ; bool param R1C1_MR, caption = "R1C1 Merge Right", visible=@enBAorE==1,default=false, endparam bool param R1C2_MR, caption = "R1C2 Merge Right", visible=@enBAorE==1 && @iCCols >= 3, default=false, endparam bool param R1C3_MR, caption = "R1C3 Merge Right", visible=@enBAorE==1 && @iCCols >= 4, default=false, endparam bool param R1C4_MR, caption = "R1C4 Merge Right", visible=@enBAorE==1 && @iCCols >= 5, default=false, endparam bool param R1C5_MR, caption = "R1C5 Merge Right", visible=@enBAorE==1 && @iCCols >= 6, default=false, endparam bool param R1C6_MR, caption = "R1C6 Merge Right", visible=@enBAorE==1 && @iCCols >= 7, default=false, endparam bool param R2C1_MR, caption = "R2C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 2, default=false, endparam bool param R2C2_MR, caption = "R2C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 3, default=false, endparam bool param R2C3_MR, caption = "R2C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 4, default=false, endparam bool param R2C4_MR, caption = "R2C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 5, default=false, endparam bool param R2C5_MR, caption = "R2C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 6, default=false, endparam bool param R2C6_MR, caption = "R2C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 7, default=false, endparam bool param R3C1_MR, caption = "R3C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 3, default=false, endparam bool param R3C2_MR, caption = "R3C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 3, default=false, endparam bool param R3C3_MR, caption = "R3C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 4, default=false, endparam bool param R3C4_MR, caption = "R3C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 5, default=false, endparam bool param R3C5_MR, caption = "R3C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 6, default=false, endparam bool param R3C6_MR, caption = "R3C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 7, default=false, endparam bool param R4C1_MR, caption = "R4C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 4, default=false, endparam bool param R4C2_MR, caption = "R4C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 3, default=false, endparam bool param R4C3_MR, caption = "R4C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 4, default=false, endparam bool param R4C4_MR, caption = "R4C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 5, default=false, endparam bool param R4C5_MR, caption = "R4C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 6, default=false, endparam bool param R4C6_MR, caption = "R4C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 7, default=false, endparam bool param R5C1_MR, caption = "R5C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 5, default=false, endparam bool param R5C2_MR, caption = "R5C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 3, default=false, endparam bool param R5C3_MR, caption = "R5C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 4, default=false, endparam bool param R5C4_MR, caption = "R5C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 5, default=false, endparam bool param R5C5_MR, caption = "R5C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 6, default=false, endparam bool param R5C6_MR, caption = "R5C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 7, default=false, endparam bool param R6C1_MR, caption = "R6C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 6, default=false, endparam bool param R6C2_MR, caption = "R6C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 3, default=false, endparam bool param R6C3_MR, caption = "R6C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 4, default=false, endparam bool param R6C4_MR, caption = "R6C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 5, default=false, endparam bool param R6C5_MR, caption = "R6C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 6, default=false, endparam bool param R6C6_MR, caption = "R6C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 7, default=false, endparam bool param R7C1_MR, caption = "R7C1 Merge Right", visible=@enBAorE==1 && @iCRows >= 7, default=false, endparam bool param R7C2_MR, caption = "R7C2 Merge Right", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 3, default=false, endparam bool param R7C3_MR, caption = "R7C3 Merge Right", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 4, default=false, endparam bool param R7C4_MR, caption = "R7C4 Merge Right", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 5, default=false, endparam bool param R7C5_MR, caption = "R7C5 Merge Right", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 6, default=false, endparam bool param R7C6_MR, caption = "R7C6 Merge Right", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 7, default=false, endparam ; ; Expert Merge Right Parameters ; int param MR_R1 , caption="Row 1", default=0, min=0, visible=@enBAorE==2, endparam int param MR_R2 , caption="Row 2", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 2, endparam int param MR_R3 , caption="Row 3", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 3, endparam int param MR_R4 , caption="Row 4", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 4, endparam int param MR_R5 , caption="Row 5", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 5, endparam int param MR_R6 , caption="Row 6", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 6, endparam int param MR_R7 , caption="Row 7", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 7, endparam int param MR_R8 , caption="Row 8", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 8, endparam int param MR_R9 , caption="Row 9", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 9, endparam int param MR_R10, caption="Row 10", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 10, endparam int param MR_R11, caption="Row 11", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 11, endparam int param MR_R12, caption="Row 12", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 12, endparam int param MR_R13, caption="Row 13", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 13, endparam int param MR_R14, caption="Row 14", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 14, endparam int param MR_R15, caption="Row 15", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 15, endparam int param MR_R16, caption="Row 16", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 16, endparam int param MR_R17, caption="Row 17", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 17, endparam int param MR_R18, caption="Row 18", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 18, endparam int param MR_R19, caption="Row 19", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 19, endparam int param MR_R20, caption="Row 20", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 20, endparam int param MR_R21, caption="Row 21", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 21, endparam int param MR_R22, caption="Row 22", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 22, endparam int param MR_R23, caption="Row 23", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 23, endparam int param MR_R24, caption="Row 24", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 24, endparam int param MR_R25, caption="Row 25", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 25, endparam int param MR_R26, caption="Row 26", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 26, endparam int param MR_R27, caption="Row 27", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 27, endparam int param MR_R28, caption="Row 28", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 28, endparam int param MR_R29, caption="Row 29", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 29, endparam int param MR_R30, caption="Row 30", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 30, endparam int param MR_R31, caption="Row 31", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 31, endparam heading caption=" Merge cells down" visible = @enBAorE != "Basic" expanded = false endheading ; ; Advanced Parameters ; bool param R1C1_MD, caption = "R1C1 Merge Down", visible=@enBAorE==1,default=false, endparam bool param R1C2_MD, caption = "R1C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 2, default=false, endparam bool param R1C3_MD, caption = "R1C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 3, default=false, endparam bool param R1C4_MD, caption = "R1C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 4, default=false, endparam bool param R1C5_MD, caption = "R1C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 5, default=false, endparam bool param R1C6_MD, caption = "R1C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 6, default=false, endparam bool param R1C7_MD, caption = "R1C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 7, default=false, endparam bool param R2C1_MD, caption = "R2C1 Merge Down", visible=@enBAorE==1 && @iCRows >= 3, default=false, endparam bool param R2C2_MD, caption = "R2C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 2, default=false, endparam bool param R2C3_MD, caption = "R2C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 3, default=false, endparam bool param R2C4_MD, caption = "R2C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 4, default=false, endparam bool param R2C5_MD, caption = "R2C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 5, default=false, endparam bool param R2C6_MD, caption = "R2C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 6, default=false, endparam bool param R2C7_MD, caption = "R2C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 7, default=false, endparam bool param R3C1_MD, caption = "R3C1 Merge Down", visible=@enBAorE==1 && @iCRows >= 4, default=false, endparam bool param R3C2_MD, caption = "R3C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 2, default=false, endparam bool param R3C3_MD, caption = "R3C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 3, default=false, endparam bool param R3C4_MD, caption = "R3C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 4, default=false, endparam bool param R3C5_MD, caption = "R3C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 5, default=false, endparam bool param R3C6_MD, caption = "R3C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 6, default=false, endparam bool param R3C7_MD, caption = "R3C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 7, default=false, endparam bool param R4C1_MD, caption = "R4C1 Merge Down", visible=@enBAorE==1 && @iCRows >= 5, default=false, endparam bool param R4C2_MD, caption = "R4C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 2, default=false, endparam bool param R4C3_MD, caption = "R4C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 3, default=false, endparam bool param R4C4_MD, caption = "R4C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 4, default=false, endparam bool param R4C5_MD, caption = "R4C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 5, default=false, endparam bool param R4C6_MD, caption = "R4C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 6, default=false, endparam bool param R4C7_MD, caption = "R4C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 7, default=false, endparam bool param R5C1_MD, caption = "R5C1 Merge Down", visible=@enBAorE==1 && @iCRows >= 6, default=false, endparam bool param R5C2_MD, caption = "R5C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 2, default=false, endparam bool param R5C3_MD, caption = "R5C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 3, default=false, endparam bool param R5C4_MD, caption = "R5C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 4, default=false, endparam bool param R5C5_MD, caption = "R5C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 5, default=false, endparam bool param R5C6_MD, caption = "R5C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 6, default=false, endparam bool param R5C7_MD, caption = "R5C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 7, default=false, endparam bool param R6C1_MD, caption = "R6C1 Merge Down", visible=@enBAorE==1 && @iCRows >= 7, default=false, endparam bool param R6C2_MD, caption = "R6C2 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 2, default=false, endparam bool param R6C3_MD, caption = "R6C3 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 3, default=false, endparam bool param R6C4_MD, caption = "R6C4 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 4, default=false, endparam bool param R6C5_MD, caption = "R6C5 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 5, default=false, endparam bool param R6C6_MD, caption = "R6C6 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 6, default=false, endparam bool param R6C7_MD, caption = "R6C7 Merge Down", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 7, default=false, endparam ; ; Expert Parameters ; int param MD_R1 , caption="Row 1", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 2, endparam int param MD_R2 , caption="Row 2", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 3, endparam int param MD_R3 , caption="Row 3", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 4, endparam int param MD_R4 , caption="Row 4", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 5, endparam int param MD_R5 , caption="Row 5", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 6, endparam int param MD_R6 , caption="Row 6", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 7, endparam int param MD_R7 , caption="Row 7", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 8, endparam int param MD_R8 , caption="Row 8", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 9, endparam int param MD_R9 , caption="Row 9", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 10, endparam int param MD_R10, caption="Row 10", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 11, endparam int param MD_R11, caption="Row 11", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 12, endparam int param MD_R12, caption="Row 12", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 13, endparam int param MD_R13, caption="Row 13", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 14, endparam int param MD_R14, caption="Row 14", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 15, endparam int param MD_R15, caption="Row 15", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 16, endparam int param MD_R16, caption="Row 16", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 17, endparam int param MD_R17, caption="Row 17", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 18, endparam int param MD_R18, caption="Row 18", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 19, endparam int param MD_R19, caption="Row 19", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 20, endparam int param MD_R20, caption="Row 20", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 21, endparam int param MD_R21, caption="Row 21", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 22, endparam int param MD_R22, caption="Row 22", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 22, endparam int param MD_R23, caption="Row 23", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 24, endparam int param MD_R24, caption="Row 24", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 25, endparam int param MD_R25, caption="Row 25", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 26, endparam int param MD_R26, caption="Row 26", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 27, endparam int param MD_R27, caption="Row 27", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 28, endparam int param MD_R28, caption="Row 28", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 29, endparam int param MD_R29, caption="Row 29", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 30, endparam int param MD_R30, caption="Row 30", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 31, endparam int param MD_R31, caption="Row 31", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 32, endparam heading caption=" Merge Symmetry and Tiling" visible = @enBAorE != "Basic" expanded = false endheading param enMergeSymmetry caption = "Symmetry/Tiling Mode" enum = "None" "Mirror Across Horizontal" "Mirror Across Vertical" "Horizontal and Vertical Mirror" \ "Custom Tiling" visible = @enBAorE != "Basic" default = 0 hint = "Symmetry/Tiling use Merge Right and Merge Down Cells" endparam int param iTileWidth caption ="Tile Width (Cols)" visible = @enBAorE != "Basic" && @enMergeSymmetry == "Custom Tiling" default = 0 hint = "Starting from the upper left corner, the number of columns to \ use in the pattern." endparam int param iTileHeight caption = "Tile Height (Rows)" visible = @enBAorE != "Basic" && @enMergeSymmetry == "Custom Tiling" default = 0 hint = "Starting from the upper left corner, the number of rows to \ use in the pattern." endparam bool param bTileWrap caption = "Wrap Tiles" visible = @enBAorE != "Basic" && @enMergeSymmetry == "Custom Tiling" default = false hint = "Tiles will wrap at the beginning of a row rather than restart from \ the beginning of the pattern." endparam $endif heading caption = "Color/Fill: Cells" visible = @enBAorE != "Basic" expanded = false endheading float param fFillColorRot caption = "Fill Color Rotation" min = 0.00 max = 1.00 default = 0.75 visible = (@enBAorE != "Basic") hint = "Changes the position on the gradient where gradient coloring begins \ or where the single color is set." endparam float param fFillColorRange caption = "Fill Color Range" min = 0.01 max = 1.00 default = 0.25 visible = (@enBAorE != "Basic") hint = "Specifies the fraction of the gradient to use with gradient coloring." endparam float param fFillColorSingle caption = "Fill Color Single" min = 0.00 max = 1.00 default = 0.50 visible = (@enBAorE != "Basic") hint = "Specifies where in the fill color range to get the color for 'Single.' Default \ is 0.5 for the midpoint of the range." endparam heading caption = " Primary (Default) Cell Color" visible = @enBAorE != "Basic" expanded = false endheading param enFillColor caption = "Fill Blocks Color" enum = "Single" "Solid" "Gradient" visible = @enBAorE != "Basic" default = 1 hint = "Coloring modes for the block fills frame." endparam $ifdef FULL_VERSION heading caption = " Individual Cell Coloring" visible = @enBAorE != "Basic" expanded = false endheading $endif param enIndvColor caption = "Cell Color" enum = "Single" "Solid" "Gradient" hint = "Sets individual cells to an alternate color." $ifdef FULL_VERSION visible = @enBAorE != "Basic" $else visible = false $endif endparam $ifdef FULL_VERSION ; ; Advanced Parameters ; bool param R1C1_FL, caption = "R1C1 Fill Cell", visible=@enBAorE==1,default=false, endparam bool param R1C2_FL, caption = "R1C2 Fill Cell", visible=@enBAorE==1 && @iCCols >= 2, default=false, endparam bool param R1C3_FL, caption = "R1C3 Fill Cell", visible=@enBAorE==1 && @iCCols >= 3, default=false, endparam bool param R1C4_FL, caption = "R1C4 Fill Cell", visible=@enBAorE==1 && @iCCols >= 4, default=false, endparam bool param R1C5_FL, caption = "R1C5 Fill Cell", visible=@enBAorE==1 && @iCCols >= 5, default=false, endparam bool param R1C6_FL, caption = "R1C6 Fill Cell", visible=@enBAorE==1 && @iCCols >= 6, default=false, endparam bool param R1C7_FL, caption = "R1C7 Fill Cell", visible=@enBAorE==1 && @iCCols >= 7, default=false, endparam bool param R2C1_FL, caption = "R2C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2, default=false, endparam bool param R2C2_FL, caption = "R2C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 2, default=false, endparam bool param R2C3_FL, caption = "R2C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 3, default=false, endparam bool param R2C4_FL, caption = "R2C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 4, default=false, endparam bool param R2C5_FL, caption = "R2C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 5, default=false, endparam bool param R2C6_FL, caption = "R2C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 6, default=false, endparam bool param R2C7_FL, caption = "R2C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 2 && @iCCols >= 7, default=false, endparam bool param R3C1_FL, caption = "R3C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3, default=false, endparam bool param R3C2_FL, caption = "R3C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 2, default=false, endparam bool param R3C3_FL, caption = "R3C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 3, default=false, endparam bool param R3C4_FL, caption = "R3C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 4, default=false, endparam bool param R3C5_FL, caption = "R3C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 5, default=false, endparam bool param R3C6_FL, caption = "R3C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 6, default=false, endparam bool param R3C7_FL, caption = "R3C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 3 && @iCCols >= 7, default=false, endparam bool param R4C1_FL, caption = "R4C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4, default=false, endparam bool param R4C2_FL, caption = "R4C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 2, default=false, endparam bool param R4C3_FL, caption = "R4C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 3, default=false, endparam bool param R4C4_FL, caption = "R4C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 4, default=false, endparam bool param R4C5_FL, caption = "R4C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 5, default=false, endparam bool param R4C6_FL, caption = "R4C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 6, default=false, endparam bool param R4C7_FL, caption = "R4C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 4 && @iCCols >= 7, default=false, endparam bool param R5C1_FL, caption = "R5C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5, default=false, endparam bool param R5C2_FL, caption = "R5C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 2, default=false, endparam bool param R5C3_FL, caption = "R5C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 3, default=false, endparam bool param R5C4_FL, caption = "R5C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 4, default=false, endparam bool param R5C5_FL, caption = "R5C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 5, default=false, endparam bool param R5C7_FL, caption = "R5C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 7, default=false, endparam bool param R5C6_FL, caption = "R5C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 5 && @iCCols >= 6, default=false, endparam bool param R6C1_FL, caption = "R6C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6, default=false, endparam bool param R6C2_FL, caption = "R6C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 2, default=false, endparam bool param R6C3_FL, caption = "R6C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 3, default=false, endparam bool param R6C4_FL, caption = "R6C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 4, default=false, endparam bool param R6C5_FL, caption = "R6C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 5, default=false, endparam bool param R6C6_FL, caption = "R6C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 6, default=false, endparam bool param R6C7_FL, caption = "R6C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 6 && @iCCols >= 7, default=false, endparam bool param R7C1_FL, caption = "R7C1 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7, default=false, endparam bool param R7C2_FL, caption = "R7C2 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 2, default=false, endparam bool param R7C3_FL, caption = "R7C3 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 3, default=false, endparam bool param R7C4_FL, caption = "R7C4 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 4, default=false, endparam bool param R7C5_FL, caption = "R7C5 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 5, default=false, endparam bool param R7C6_FL, caption = "R7C6 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 6, default=false, endparam bool param R7C7_FL, caption = "R7C7 Fill Cell", visible=@enBAorE==1 && @iCRows >= 7 && @iCCols >= 7, default=false, endparam ; ; Expert Parameters ; int param FL_R1 , caption="Row 1", default=0, min=0, visible=@enBAorE==2, endparam int param FL_R2 , caption="Row 2", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 2, endparam int param FL_R3 , caption="Row 3", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 3, endparam int param FL_R4 , caption="Row 4", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 4, endparam int param FL_R5 , caption="Row 5", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 5, endparam int param FL_R6 , caption="Row 6", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 6, endparam int param FL_R7 , caption="Row 7", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 7, endparam int param FL_R8 , caption="Row 8", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 8, endparam int param FL_R9 , caption="Row 9", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 9, endparam int param FL_R10, caption="Row 10", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 10, endparam int param FL_R11, caption="Row 11", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 11, endparam int param FL_R12, caption="Row 12", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 12, endparam int param FL_R13, caption="Row 13", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 13, endparam int param FL_R14, caption="Row 14", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 14, endparam int param FL_R15, caption="Row 15", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 15, endparam int param FL_R16, caption="Row 16", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 16, endparam int param FL_R17, caption="Row 17", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 17, endparam int param FL_R18, caption="Row 18", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 18, endparam int param FL_R19, caption="Row 19", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 19, endparam int param FL_R20, caption="Row 20", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 20, endparam int param FL_R21, caption="Row 21", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 21, endparam int param FL_R22, caption="Row 22", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 22, endparam int param FL_R23, caption="Row 23", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 23, endparam int param FL_R24, caption="Row 24", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 24, endparam int param FL_R25, caption="Row 25", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 25, endparam int param FL_R26, caption="Row 26", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 26, endparam int param FL_R27, caption="Row 27", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 27, endparam int param FL_R28, caption="Row 28", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 28, endparam int param FL_R29, caption="Row 29", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 29, endparam int param FL_R30, caption="Row 30", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 30, endparam int param FL_R31, caption="Row 31", default=0, min=0, visible=@enBAorE==2 && @iCRows >= 31, endparam heading caption=" Fill Symmetry and Tiling" visible = @enBAorE != "Basic" expanded = false endheading param enFillSymmetry caption = "Symmetry/Tiling Mode" enum = "None" "Mirror Across Horizontal" "Mirror Across Vertical" "Horizontal and Vertical Mirror" \ "Custom Tiling" visible = @enBAorE != "Basic" default = 0 hint = "Symmetry/Tiling use Merge Right and Merge Down Cells" endparam int param iFillTileWidth caption ="Tile Width (Cols)" visible = @enBAorE != "Basic" && @enFillSymmetry == "Custom Tiling" default = 0 hint = "Starting from the upper left corner, the number of columns to \ use in the pattern." endparam int param iFillTileHeight caption = "Tile Height (Rows)" visible = @enBAorE != "Basic" && @enFillSymmetry == "Custom Tiling" default = 0 hint = "Starting from the upper left corner, the number of rows to \ use in the pattern." endparam bool param bFillTileWrap caption = "Wrap Tiles" visible = @enBAorE != "Basic" && @enFillSymmetry == "Custom Tiling" default = false hint = "Tiles will wrap at the beginning of a row rather than restart from \ the beginning of the pattern." endparam $endif heading caption = " Cell Areas - Ranges and Unify" visible = @enBAorE != "Basic" expanded = false endheading bool param bUnifyMergeFills caption = "Unify Merged Cells" Hint = "When enabled, merged cells have a single fill. When disabled, \ merged cells have a separate fill for each cell." default = true visible = (@enBAorE != "Basic") endparam bool param bOOMask ; One opening mask caption = "Mask In/Out One Cell" Default = false hint = "When set to 'Mask-In,' all other cell but the specified one, and all frames, \ are set to to solid. This creates a mask that can be used to fill an \ area. Note if cells are unified, selecting any cell in a unified \ area will 'Mask-In' the whole area. When 'Mask-Out is set, the specified \ cell (or area if the cell is in a unified group of cells), is set to \ 'Solid.'" endparam param enOOMType caption = "Mask Type" enum = "Mask-In Cell" "Mask-Out Cell" visible = @bOOMask && (@enBAorE != "Basic") hint = "When 'Mask-In' the cell is the only area not 'Solid.' When Mask-Out, \ the specified cell is set to 'Solid.'" endparam int param iRowOpening caption = "Row of Block Fill" enabled = @bOOMask default = 1 min = 1 max = 100 hint = "Row of one cell not to color 'Solid. If the selected cell \ is part of a group of cells that are painted as a single cell \ (unified or merged), then the range of cells will be painted." visible = @bOOMask endparam int param iColOpening caption = "Column of Block Fill" enabled = @bOOMask default = 1 min = 1 max = 100 hint = "Column of one cell not to color 'Solid. If the selected cell \ is part of a group of cells that are painted as a single cell \ (unified or merged), then the range of cells will be painted." visible = @bOOMask endparam ;--------- Unify Range #1 ------------------ bool param bUR1 caption = "Show/Hide Range #1" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR1 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR1) endparam bool param bUnifyUR1 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR1) default = false endparam int param iSRUR1 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR1) endparam int param iSCUR1 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR1) endparam int param iERUR1 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR1) endparam int param iECUR1 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR1) endparam ;--------- Unify Range #2 ------------------ bool param bUR2 caption = "Show/Hide Range #2" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR2 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR2) endparam bool param bUnifyUR2 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR2) default = false endparam int param iSRUR2 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR2) endparam int param iSCUR2 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR2) endparam int param iERUR2 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR2) endparam int param iECUR2 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR2) endparam ;--------- Unify Range #3 ------------------ bool param bUR3 caption = "Show/Hide Range #3" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR3 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR3) endparam bool param bUnifyUR3 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR3) default = false endparam int param iSRUR3 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR3) endparam int param iSCUR3 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR3) endparam int param iERUR3 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR3) endparam int param iECUR3 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR3) endparam ;--------- Unify Range #4 ------------------ bool param bUR4 caption = "Show/Hide Range #4" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR4 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR4) endparam bool param bUnifyUR4 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR4) default = false endparam int param iSRUR4 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR4) endparam int param iSCUR4 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR4) endparam int param iERUR4 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR4) endparam int param iECUR4 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR4) endparam ;--------- Unify Range #5 ------------------ bool param bUR5 caption = "Show/Hide Range #5" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR5 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR5) endparam bool param bUnifyUR5 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR5) default = false endparam int param iSRUR5 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR5) endparam int param iSCUR5 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR5) endparam int param iERUR5 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR5) endparam int param iECUR5 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR5) endparam ;--------- Unify Range #6 ------------------ bool param bUR6 caption = "Show/Hide Range #6" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR6 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR6) endparam bool param bUnifyUR6 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR6) default = false endparam int param iSRUR6 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR6) endparam int param iSCUR6 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR6) endparam int param iERUR6 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR6) endparam int param iECUR6 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR6) endparam ;--------- Unify Range #7 ------------------ bool param bUR7 caption = "Show/Hide Range #7" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR7 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR7) endparam bool param bUnifyUR7 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR7) default = false endparam int param iSRUR7 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR7) endparam int param iSCUR7 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR7) endparam int param iERUR7 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR7) endparam int param iECUR7 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR7) endparam ;--------- Unify Range #8 ------------------ bool param bUR8 caption = "Show/Hide Range #8" Hint = "Colors and/or unifies a group of cells. Parameters are still active \ when a range is hidden." default = false visible = @enBAorE != "Basic" endparam param enClrUR8 caption = "Range Color" enum = "Single" "Solid" "Gradient" hint = "Color/Fill to use for the specified range of cells." visible = ((@enBAorE != "Basic") && @bUR8) endparam bool param bUnifyUR8 caption = "Unify Range for Single Fill" hint = "Unified cells are painted as if they are a single cell." visible = ((@enBAorE != "Basic") && @bUR8) default = false endparam int param iSRUR8 caption = "Start Row" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR8) endparam int param iSCUR8 caption = "Start Column" min = 1 max = 100 visible = ((@enBAorE != "Basic") && @bUR8) endparam int param iERUR8 caption ="End Row" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR8) endparam int param iECUR8 caption ="End Column" min = 0 max = 100 default = 0 visible = ((@enBAorE != "Basic") && @bUR8) endparam $ifdef FULL_VERSION heading caption = " Gradient Cell Fill Parameters" text = " -- No cells currently use gradient fills --" visible = ( @enBAorE != "Basic") && (@enFillColor != "Gradient") && (@enIndvColor != "Gradient") \ && (@enClrUR1 != "Gradient") && (@enClrUR2 != "Gradient") && (@enClrUR3 != "Gradient") \ && (@enClrUR4 != "Gradient") && (@enClrUR5 != "Gradient") && (@enClrUR6 != "Gradient") \ && (@enClrUR7 != "Gradient") && (@enClrUR8 != "Gradient") endheading heading caption = " Gradient Cell Fill Parameters" visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) expanded = false endheading $else heading caption = " Gradient Cell Fill Parameters" visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) expanded = false endheading $endif param enFillType caption = "Shape/Fill Type" enum = "Rectangle" "Cross" "Ellipse" "Radial" "Linear" \ "Symmetrical Linear" "Rounded Rect Plus" "Superformula Shapes" \ "Random" "Modulated 1" "Modulated 2" "Modulated 3" visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam bool param bStepped caption = "Stepped" hint = "Each block get only a single color...only useful if cells are unified." visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param fFillColorScale caption = "Color Density" min = 0.01 default = 1 visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) hint = "Scales the gradient used for shapes in cell fills." endparam float param fAspectColorScale caption = "Aspect Color Density" default = 0 visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) hint = "Scales according the aspect (stretch) of the cell. The greater \ the difference from a stretch of 1.0, the more the gradient is \ changed." endparam bool param bRepeatGradient caption = "Repeat Gradient" default = false visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) hint = "Repeats within the alloted portion of the gradient" endparam int param iSeedBlock caption = "Random Seed" visible = ( @enBAorE != "Basic" ) && (@enFillType == "Random") && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = 1234 hint = "Change the value to change the random coloring." endparam bool param bFollowAspect caption = "Initial Stretch from Cell" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle") \ || (@enFillType == "Cross") || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = true Hint = "Forces the shape to start with the aspect (Stretch) of the cell being painted. 'Shape \ Stretch (X/Y)' then is applied." endparam float param fShapeStretchXY caption = "Shape Stretch (X/Y)" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle") \ || (@enFillType == "Radial") || (@enFillType == "Cross") || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = 1.0 endparam bool param bEqualBands caption = "Equal Bands" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = true hint = "Forces equal bands of color. When StretchXY is not equal to 1.0, the bands of color \ in an elipse will be different sizes on the X axis than on the Y. This setting \ compensates for the stretch by changing the aspect ratio (stretch) as the bands \ approach the center of the frame." endparam int param iMod caption = "Mod" visible = @enBAorE != "Basic" && ((@enFillType == "Modulated 1") \ || (@enFillType == "Modulated 2") || (@enFillType == "Modulated 3")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = 4 endparam complex param cOffsetXY caption = "OffsetXY" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle") \ || (@enFillType == "Radial") || (@enFillType == "Cross") || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam bool param bRelativeOffset caption = "Relative Offset" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle") \ || (@enFillType == "Cross") || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = true hint = "Compensate offset in larger (unified) cells." endparam float param fCellRotation caption = "Cell Rotation" min = -360 max = 360 ; visible = (@enBAorE != "Basic") && ((@enFillType == "Ellipse") \ ; || (@enFillType == "Rectangle") || (@enFillType == "Cross") \ ; || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes") \ ; || (@enFillType == "Radial" || (@enFillType == "Linear") || (@enFillType == "Symmetrical Linear")) visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Ellipse") || (@enFillType == "Rectangle") \ || (@enFillType == "Cross") || (@enFillType == "Rounded Rect Plus") || (@enFillType == "Superformula Shapes") \ || (@enFillType == "Radial") || (@enFillType == "Linear") || (@enFillType == "Symmetrical Linear")) \ && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param fPower caption = "Shape Power" default = 15 visible = ( @enBAorE != "Basic" ) && (@enFillType == "Rounded Rect Plus") && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param fShapeScale caption = "Shape Scale" visible = ( @enBAorE != "Basic" ) && (@enFillType == "Superformula Shapes") && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) default = 1 endparam bool param bCustomShape caption = "Custom Shape" visible = ( @enBAorE != "Basic" ) && (@enFillType == "Superformula Shapes") && ((@enFillColor == "Gradient") || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam param enShape caption = "Predefined Shapes" enum="#1: 1,1.1,24,1.7,0.7,6" \ "#2: -2.6,1.1,8,1.7,0.7,9.6" \ "#3: 24,1.1,16,0.5,0.7,0" \ "#4: 24,1.1,8,0.5,0.7,0" \ "#5: 1,1,7,3,6,6" \ "#6: 6.5,1.1,8,0.5,0.7,0" \ "#7: 5,1.1,8,0.5,1.9,0" \ "#8: -1.3,1.1,8,1.7,4,0" \ "#9: -5,1.1,10,0.54,1,0" \ "#10: -5,1,10,0.5,2,0" \ "#11: 1,1,3,5,18,18" \ "#12: 1,1,6,20,7,18" \ "#13: 1,1,4,2,1,3" \ "#14: 1,1,8,3,4,17" \ "#15: 1,0.6,12,32,1,-11" \ "#16: 0.3,1.01,-8.1,1,1,150 (6)" \ "#17: 1,1,19,9,14,13" \ "#18: 1.5,2,8,0.9,1.8,0.8" \ "#19: 1.6,1,12,1.5,2,7.5" \ "#20: 2.7,2.6,6,12,8.3,5.3" \ "#21: 1.5,2,2,1.7,0.7,2" \ "#22: 1.2,2.8,32,3,0.9,6" \ "#23: 0.9,10,4,4.2,17,1.5" \ "#24: 1,1,3,4.5,10,10" \ "#25: 1,1,4,12,15,15" \ "#26: 1,1,7,10,6,6" \ "#27: 0.3,1,-8.5,1,1,140 (4)" \ "#28: 10,10,5,1,7,7" \ "#29: 1,1,12,15,20,3" \ "#30: 1,1,8,1,1,8" \ "#31: 0.3,1.01,-8.5,1,1,160 (4)" \ "#32: 1,1,5,2,6,6" \ "#33: 1,1,6,1,1,6" \ "#34: 1,1,3,6,6,6" \ "#35: 1,1,2,1,1,1" \ "#36: 1,1,2,1,4,8" \ "#37: 1,1,8,7,8,2" \ "#38: 1,1,1,1,1,1" \ "#39: 1,1,2,1,1,-1.27" \ "#40: 1,1,3,1,1,1" \ "#41: 1,1,4,1,1,1" \ "#42: 17,1,27.6,24,2,6 (4)" \ "#43: 1,1,6,1,1,1" \ "#44: 1,1,1,0.3,0.3,0.3" \ "#45: 1,1,2,0.3,0.3,0.3" \ "#46: 1,1,3,0.3,0.3,0.3" \ "#47: 1,1,4,0.3,0.3,0.3" \ "#48: 1.9,2.8,32,3,0.9,0.6" \ "#49: 1,0.85,2,-3,1,20" \ "#50: 1,0.85,22,-0.11,0.9,4" \ "#51: 0.4,0.85,22,-0.11,0.9,4" \ "#52: 1,1.2,24,2,1,4" \ "#53: 1,1.21,4,-0.11,3.77,0.77" \ "#54: -1.15,1.21,4,-0.11,3.77,0.77" \ "#55: 1.2,1.1,16,0.5,3.4,0.9" \ "#56: 1.2,1.2,4,0.5,3.5,1" \ "#57: 1.2,-2.0,4,0.5,9,1" \ "#58: 1.2,-2.0,8,0.5,9,1" \ "#59: 0.3,0.3,8,0.3,0.3,0.6" \ "#60: 1,1,1,1,1,40" \ "#61: 1,1,22,1,1,40" \ "#62: 1,-0.67,22,1,1,40" \ "#63: 1,0.6,12,32,1,40" \ "#64: 1,0.6,12,32,400,40" \ "#65: 1,0.6,12,32,8,-11" \ "#66: 17,1,27.6,3,2,6 (3)" \ "#67: 1,0.6,12,-400,1,270" \ "#68: 1.05,1.1,24,0.4,3.5,0.87" \ "#69: 1.5,2,2,2,1.7,6" \ "#70: 1.11,1.1,24,0.4,5,1.12" \ "#71: 1.11,1.1,44,1.1,0.9,0.3" \ "#72: 1,1.1,24,0.4,3.5,0.87" \ "#73: 1,1.3,27.6,3,1,6 (3)" \ "#74: 1,1.4,24.5,3,1,6 (4)" \ "#75: 0.5,1.3,5.7,1,6,2 (4)" \ "#76: 1.5,2,9.9,1.8,0.8,4 (4)" \ "#77: 1,-0.67,22.3,1,1,40 (3)" visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && !@bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param a default = 1.19 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param b default = 2.8 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param m default = 32 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) Hint = "Tends to multiply the number of lobes in the shape." endparam float param n1 default = 3 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param n2 default = 0.9 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam float param n3 default = 6 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) endparam int param iSweeps caption = "Sweeps" default = 1 min = 1 max = 100 visible = ( @enBAorE != "Basic" ) && ((@enFillType == "Superformula Shapes") && @bCustomShape) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) hint = "Typically only changes the shape if 'm' has a fractional value (i.e. \ 8.4 as apposed to 8)." endparam float param fInsideClip caption = "Inside Clip" visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) min = 0.0 max = 1.0 default = 0.0 hint = "Clips the left end of the section of gradient allocated to block/cell fills." endparam float param fOutsideClip caption = "Outside Clip" visible = ( @enBAorE != "Basic" ) && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) min = 0.0 max = 1.0 default = 0.0 hint = "Clips the right end of the section of gradient allocated to block/cell fills." endparam float param fAngleToClip caption = "Angle to Clip" visible = ( @enBAorE != "Basic" ) && !@bStepped && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) min = 0.0 max = 360 default = 0.0 hint = "Clips out an angle (pie) slice." endparam float param fAngleClipRef caption = "Angle Clip Reference" visible = ( @enBAorE != "Basic" ) && !@bStepped && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) min = -360 max = 360 default = 0.0 hint = "Reference angle for angle clipping...center of the pie to be clipped." endparam complex param cAngleClipOffset caption = "Angle Clip Offset" visible = ( @enBAorE != "Basic" ) && !@bStepped && ((@enFillColor == "Gradient") \ || (@enIndvColor == "Gradient") \ || (@enClrUR1 == "Gradient") || (@enClrUR2 == "Gradient") || (@enClrUR3 == "Gradient") \ || (@enClrUR4 == "Gradient") || (@enClrUR5 == "Gradient") || (@enClrUR6 == "Gradient") \ || (@enClrUR7 == "Gradient") || (@enClrUR8 == "Gradient")) hint = "How much to offset the center of the angle clip" endparam int param iVersion visible = false default = 1 endparam } ; End Matting and Framing ;=========================================================== ;=========================================================== ; ; ; S u p e r f o r m u l a S h a p e d G r a d i e n t ; ; ;============================================================ ;=========================================================== Superformula_Shaped_Gradients { ; Written by Robert Bunney ; Creates shapes based on the equation named 'Superformula' ; Values found in the 'Predefined Shapes' dropdown listbox may be ; copied into list visable when the 'Custom Shape' checkbox is ; checked. ; ;Google 'Superformula' or see these web sites: ; http://local.wasp.uwa.edu.au/~pbourke/surfaces_curves/supershape/ ; http://wiki.tcl.tk/12977 global: ; Image width and height in fractal coords (not pixel) units float fImageWidth, float fImageHeight float fXCenter, float fYCenter ; resolution in pixels float fXRes = real(#screenmax) float fYRes = imag(#screenmax) * @fStretchXY float fMag = 1 if (@bConstMag) fMag = #Magn endif if (round(fXRes) == round(fYRes)) fImageWidth = 4.0 /fMag * @fStretchXY fImageHeight = 4.0 /fMag elseif (fYRes > fXRes) fImageWidth = 4.0/fMag fImageHeight = 4.0*fYRes/fXRes/fMag if (@fStretchXY > 1.0) fImageWidth = fImageWidth * @fStretchXY elseif (@fStretchXY < 1.0) fImageHeight = fImageHeight / @fStretchXY endif else fImageHeight = 3.0/fMag fImageWidth = 3.0*fXRes/fYRes/fMag if (@fStretchXY > 1.0) fImageHeight = fImageHeight / @fStretchXY elseif (@fStretchXY < 1.0) fImageWidth = fImageWidth * @fStretchXY endif endif if (@bUseCenter) fXCenter = real(#center) fYCenter = imag(#center) else fXCenter = 0 fYCenter = 0 endif float fMaxDist = sqrt((fImageWidth/2)^2 + (fImageHeight/2)^2) float a=0, float b=0, float m=0, float n1=0, float n2=0, float n3=0 if (@bCustom) int s = @iSweeps else int s = 1 endif if (@bCustom) a=@a, b=@b, m=@m, n1=@n1, n2=@n2, n3=@n3 elseif (@enShape == "#1: 1,1.1,24,1.7,0.7,6") a=1, b=1.1, m=24, n1=1.7, n2=0.7, n3=6 elseif (@enShape == "#2: -2.6,1.1,8,1.7,0.7,9.6") a=-2.6, b=1.1, m=8, n1=1.7, n2=0.7, n3=9.6 elseif (@enShape == "#3: 24,1.1,16,0.5,0.7,0") a=24, b=1.1, m=16, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "#4: 24,1.1,8,0.5,0.7,0") a=24, b=1.1, m=8, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "#5: 1,1,7,3,6,6") a=1, b=1, m=7, n1=3, n2=6, n3=6 elseif (@enShape == "#6: 6.5,1.1,8,0.5,0.7,0") a=6.5, b=1.1, m=8, n1=0.5, n2=0.7, n3=0.0 elseif (@enShape == "#7: 5,1.1,8,0.5,1.9,0") a=5, b=1.1, m=8, n1=0.5, n2=1.9, n3=0 elseif (@enShape == "#8: -1.3,1.1,8,1.7,4,0") a=-1.3, b=1.1, m=8, n1=1.7, n2=4, n3=0 elseif (@enShape == "#9: -5,1.1,10,0.54,1,0") a=-5, b=1.1, m=10, n1=0.54, n2=1, n3=0 elseif (@enShape == "#10: -5,1,10,0.5,2,0") a=-5, b=1, m=10, n1=0.5, n2=2, n3=0 elseif (@enShape == "#11: 1,1,3,5,18,18") a=1, b=1, m=3, n1=5, n2=18, n3=18 elseif (@enShape == "#12: 1,1,6,20,7,18") a=1, b=1, m=6, n1=20, n2=7, n3=18 elseif (@enShape == "#13: 1,1,4,2,1,3") a=1, b=1, m=4, n1=2, n2=1, n3=3 elseif (@enShape == "#14: 1,1,8,3,4,17") a=1, b=1, m=8, n1=3, n2=4, n3=17 elseif (@enShape == "#15: 1,0.6,12,32,1,-11") a=1, b=0.6, m=12, n1=32, n2=1, n3=-11 elseif (@enShape == "#16: 0.3,1.01,-8.1,1,1,150 (6)") a=0.3, b=1.01, m=-8.1, n1=1, n2=1, n3=150, s=6 elseif (@enShape == "#17: 1,1,19,9,14,13") a=1, b=1, m=19, n1=9, n2=14, n3=13 elseif (@enShape == "#18: 1.5,2,8,0.9,1.8,0.8") a=1.5, b=2, m=8, n1=0.9, n2=1.8, n3=0.8 elseif (@enShape == "#19: 1.6,1,12,1.5,2,7.5") a=1.6, b=1, m=12, n1=1.5, n2=2, n3=7.5 elseif (@enShape == "#20: 2.7,2.6,6,12,8.3,5.3") a=2.7, b=2.6, m=6, n1=12, n2=8.3, n3=5.3 elseif (@enShape == "#21: 1.5,2,2,1.7,0.7,2") a=1.5, b=2, m=2, n1=1.7, n2=0.7, n3=2 elseif (@enShape == "#22: 1.2,2.8,32,3,0.9,6") a=1.19, b=2.8, m=32, n1=3, n2=0.9, n3=6 elseif (@enShape == "#23: 0.9,10,4,4.2,17,1.5") a=0.9, b=10, m=4, n1=4.2, n2=17, n3=1.5 elseif (@enShape == "#24: 1,1,3,4.5,10,10") a=1, b=1, m=3, n1=4.5, n2=10, n3=10 elseif (@enShape == "#25: 1,1,4,12,15,15") a=1, b=1, m=4, n1=12, n2=15, n3=15 elseif (@enShape == "#26: 1,1,7,10,6,6") a=1, b=1, m=7, n1=10, n2=6, n3=6 elseif (@enShape == "#27: 0.3,1,-8.5,1,1,140 (4)") a=0.3, b=1, m=-8.5, n1=1, n2=1, n3=140, s=4 elseif (@enShape == "#28: 10,10,5,1,7,7") a=10, b=10, m=5, n1=1, n2=7, n3=7 elseif (@enShape == "#29: 1,1,12,15,20,3") a=1, b=1, m=12, n1=15, n2=20, n3=3 elseif (@enShape == "#30: 1,1,8,1,1,8") a=1, b=1, m=8, n1=1, n2=1, n3=8 elseif (@enShape == "#31: 0.3,1.01,-8.5,1,1,160 (4)") a=0.3, b=1.01, m=-8.5, n1=1, n2=1, n3=160, s=4 elseif (@enShape == "#32: 1,1,5,2,6,6") a=1, b=1, m=5, n1=2, n2=6, n3=6 elseif (@enShape == "#33: 1,1,6,1,1,6") a=1, b=1, m=6, n1=1, n2=1, n3=6 elseif (@enShape == "#34: 1,1,3,6,6,6") a=1, b=1, m=3, n1=6, n2=6, n3=6 elseif (@enShape == "#35: 1,1,2,1,1,1") a=1, b=1, m=2, n1=1, n2=1, n3=1 elseif (@enShape == "#36: 1,1,2,1,4,8") a=1, b=1, m=2, n1=1, n2=4, n3=8 elseif (@enShape == "#37: 1,1,8,7,8,2") a=1, b=1, m=8, n1=7, n2=8, n3=2 elseif (@enShape == "#38: 1,1,1,1,1,1") a=1, b=1, m=1, n1=1, n2=1, n3=1 elseif (@enShape == "#39: 1,1,2,1,1,-1.27") a=1, b=1, m=2, n1=1, n2=1, n3=-1.27 elseif (@enShape == "#40: 1,1,3,1,1,1") a=1, b=1, m=3, n1=1, n2=1, n3=1 elseif (@enShape == "#41: 1,1,4,1,1,1") a=1, b=1, m=4, n1=1, n2=1, n3=1 elseif (@enShape == "#42: 17,1,27.6,24,2,6 (4)") a=17, b=1, m=27.6, n1=24, n2=2, n3=6, s=4 elseif (@enShape == "#43: 1,1,6,1,1,1") a=1, b=1, m=6, n1=1, n2=1, n3=1 elseif (@enShape == "#44: 1,1,1,0.3,0.3,0.3") a=1, b=1, m=1, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#45: 1,1,2,0.3,0.3,0.3") a=1, b=1, m=2, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#46: 1,1,3,0.3,0.3,0.3") a=1, b=1, m=3, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#47: 1,1,4,0.3,0.3,0.3") a=1, b=1, m=4, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "#48: 1.9,2.8,32,3,0.9,0.6") a=1.9, b=2.8, m=32, n1=3, n2=0.9, n3=0.6 elseif (@enShape == "#49: 1,0.85,2,-3,1,20") a=1, b=0.85, m=2, n1=-3, n2=1, n3=20 elseif (@enShape == "#50: 1,0.85,22,-0.11,0.9,4") a=1, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "#51: 0.4,0.85,22,-0.11,0.9,4") a=0.4, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "#52: 1,1.2,24,2,1,4") a=1, b=1.2, m=24, n1=2, n2=1, n3=4 elseif (@enShape == "#53: 1,1.21,4,-0.11,3.77,0.77") a=1, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "#54: -1.15,1.21,4,-0.11,3.77,0.77") a=-1.15, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "#55: 1.2,1.1,16,0.5,3.4,0.9") a=1.2, b=1.1, m=16, n1=0.5, n2=3.4, n3=0.9 elseif (@enShape == "#56: 1.2,1.2,4,0.5,3.5,1") a=1.2, b=1.2, m=4, n1=0.5, n2=3.5, n3=1 elseif (@enShape == "#57: 1.2,-2.0,4,0.5,9,1") a=1.2, b=-2, m=4, n1=0.5, n2=9, n3=1 elseif (@enShape == "#58: 1.2,-2.0,8,0.5,9,1") a=1.2, b=-2, m=8, n1=0.5, n2=9, n3=1 elseif (@enShape == "#59: 0.3,0.3,8,0.3,0.3,0.6") a=0.3, b=0.3, m=8, n1=0.3, n2=0.3, n3=0.6 elseif (@enShape == "#60: 1,1,1,1,1,40") a=1, b=1, m=1, n1=1, n2=1, n3=40 elseif (@enShape == "#61: 1,1,22,1,1,40") a=1, b=1, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "#62: 1,-0.67,22,1,1,40") a=1, b=-0.67, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "#63: 1,0.6,12,32,1,40") a=1, b=0.6, m=12, n1=32, n2=1, n3=40 elseif (@enShape == "#64: 1,0.6,12,32,400,40") a=1, b=0.6, m=12, n1=32, n2=400, n3=40 elseif (@enShape == "#65: 1,0.6,12,32,8,-11") a=1, b=0.6, m=12, n1=32, n2=8, n3=-11 elseif (@enShape == "#66: 17,1,27.6,3,2,6 (3)") a=17, b=1, m=27.6, n1=3, n2=2, n3=6, s=3 elseif (@enShape == "#67: 1,0.6,12,-400,1,270") a=1, b=0.6, m=12, n1=-400, n2=1, n3=270 elseif (@enShape == "#68: 1.05,1.1,24,0.4,3.5,0.87") a=1.05, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "#69: 1.5,2,2,2,1.7,6") a=1.2, b=2, m=2, n1=2, n2=1.7, n3=6 elseif (@enShape == "#70: 1.11,1.1,24,0.4,5,1.12") a=1.11, b=1.1, m=24, n1=0.4, n2=5, n3=1.12 elseif (@enShape == "#71: 1.11,1.1,44,1.1,0.9,0.3") a=1.11, b=1.1, m=44, n1=1.1, n2=0.9, n3=0.3 elseif (@enShape == "#72: 1,1.1,24,0.4,3.5,0.87") a=1, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "#73: 1,1.3,27.6,3,1,6 (3)") a=1, b=1.3, m=27.6, n1=3, n2=1, n3=6, s=3 elseif (@enShape == "#74: 1,1.4,24.5,3,1,6 (4)") a=1, b=1.4, m=24.5, n1=3, n2=1, n3=6, s=4 elseif (@enShape == "#75: 0.5,1.3,5.7,1,6,2 (4)") a=0.5, b=1.3, m=5.7, n1=1, n2=6, n3=2, s=4 elseif (@enShape == "#76: 1.5,2,9.9,1.8,0.8,4 (4)") a=1.5, b=2, m=9.9, n1=1.8, n2=0.8, n3=4, s=4 elseif (@enShape == "#77: 1,-0.67,22.3,1,1,40 (3)") a=1, b=-0.67, m=22.3, n1=1, n2=1, n3=40, s=3 endif float fInc = #pi/180 ; 360 tests float fRMin = 999999999 float fRMax = -999999999 ; Figure out maximum size (with some certainty) float fEnd = #pi*2 while (fEnd > 0) float rr rr = (abs((cos(m * fEnd/4)/a)^n2) + ((abs(sin(m * fEnd/4)/b))^n3))^(-1.0/n1) if (rr > fRMax), fRMax = rr, endif if (rr < fRMin), fRMin = rr, endif fEnd = fEnd - fInc endwhile float fMirrorAngle = 0.0 if (@bMirror) fMirrorAngle = @fMirAngle/180*#pi fMirrorAngle = fMirrorAngle + @fRotation/180*#pi if (fMirrorAngle < 0.0), fMirrorAngle = fMirrorAngle + 2*#pi, endif if (fMirrorAngle > #pi*2), fMirrorAngle = fMirrorAngle - 2*#pi, endif endif init: loop: final: float x = real(#pixel) - fXCenter float y = (imag(#pixel) - fYCenter)*@fStretchXY float fTheta = atan(y/x) if (x < 0.0), fTheta = fTheta + #pi, endif fTheta = fTheta + #pi/180*@fRotation if (fTheta == 0), fTheta = .001, endif float fPointDist = sqrt(x^2 + y^2) float rT float r = -999999999 int i = 1 while (i <= s) i = i+1 rT = (abs((cos(m * fTheta/4)/a)^n2) + ((abs(sin(m * fTheta/4)/b))^n3))^(-1/n1) if (rT > r), r = rT, endif fTheta = fTheta + 2*#pi endwhile float fIndex = (fPointDist/((r)*(fMaxDist/fRMax)))/@fScale ; Inner and Outer clipping if ((@fRightClip > 0) && (fIndex > (1-@fRightClip))) #solid = true endif if ((@fLeftClip > 0) && (fIndex < @fLeftClip)) #solid = true endif #index = fIndex default: title = "Superformula Shaped Gradients" bool param bUseCenter caption = "Use Screen Center" default = true hint="When 'Use Screen Center' is turned off, the shape is centered \ around 0,0." endparam bool param bConstMag caption = "Constant Magnification" default = true hint="Prevents zooming or changing magnification when turned on." endparam heading Caption="Shape Parameters" endheading bool param bCustom Caption="Custom Shape" endparam param enShape caption = "Predefined Shapes" enum="#1: 1,1.1,24,1.7,0.7,6" \ "#2: -2.6,1.1,8,1.7,0.7,9.6" \ "#3: 24,1.1,16,0.5,0.7,0" \ "#4: 24,1.1,8,0.5,0.7,0" \ "#5: 1,1,7,3,6,6" \ "#6: 6.5,1.1,8,0.5,0.7,0" \ "#7: 5,1.1,8,0.5,1.9,0" \ "#8: -1.3,1.1,8,1.7,4,0" \ "#9: -5,1.1,10,0.54,1,0" \ "#10: -5,1,10,0.5,2,0" \ "#11: 1,1,3,5,18,18" \ "#12: 1,1,6,20,7,18" \ "#13: 1,1,4,2,1,3" \ "#14: 1,1,8,3,4,17" \ "#15: 1,0.6,12,32,1,-11" \ "#16: 0.3,1.01,-8.1,1,1,150 (6)" \ "#17: 1,1,19,9,14,13" \ "#18: 1.5,2,8,0.9,1.8,0.8" \ "#19: 1.6,1,12,1.5,2,7.5" \ "#20: 2.7,2.6,6,12,8.3,5.3" \ "#21: 1.5,2,2,1.7,0.7,2" \ "#22: 1.2,2.8,32,3,0.9,6" \ "#23: 0.9,10,4,4.2,17,1.5" \ "#24: 1,1,3,4.5,10,10" \ "#25: 1,1,4,12,15,15" \ "#26: 1,1,7,10,6,6" \ "#27: 0.3,1,-8.5,1,1,140 (4)" \ "#28: 10,10,5,1,7,7" \ "#29: 1,1,12,15,20,3" \ "#30: 1,1,8,1,1,8" \ "#31: 0.3,1.01,-8.5,1,1,160 (4)" \ "#32: 1,1,5,2,6,6" \ "#33: 1,1,6,1,1,6" \ "#34: 1,1,3,6,6,6" \ "#35: 1,1,2,1,1,1" \ "#36: 1,1,2,1,4,8" \ "#37: 1,1,8,7,8,2" \ "#38: 1,1,1,1,1,1" \ "#39: 1,1,2,1,1,-1.27" \ "#40: 1,1,3,1,1,1" \ "#41: 1,1,4,1,1,1" \ "#42: 17,1,27.6,24,2,6 (4)" \ "#43: 1,1,6,1,1,1" \ "#44: 1,1,1,0.3,0.3,0.3" \ "#45: 1,1,2,0.3,0.3,0.3" \ "#46: 1,1,3,0.3,0.3,0.3" \ "#47: 1,1,4,0.3,0.3,0.3" \ "#48: 1.9,2.8,32,3,0.9,0.6" \ "#49: 1,0.85,2,-3,1,20" \ "#50: 1,0.85,22,-0.11,0.9,4" \ "#51: 0.4,0.85,22,-0.11,0.9,4" \ "#52: 1,1.2,24,2,1,4" \ "#53: 1,1.21,4,-0.11,3.77,0.77" \ "#54: -1.15,1.21,4,-0.11,3.77,0.77" \ "#55: 1.2,1.1,16,0.5,3.4,0.9" \ "#56: 1.2,1.2,4,0.5,3.5,1" \ "#57: 1.2,-2.0,4,0.5,9,1" \ "#58: 1.2,-2.0,8,0.5,9,1" \ "#59: 0.3,0.3,8,0.3,0.3,0.6" \ "#60: 1,1,1,1,1,40" \ "#61: 1,1,22,1,1,40" \ "#62: 1,-0.67,22,1,1,40" \ "#63: 1,0.6,12,32,1,40" \ "#64: 1,0.6,12,32,400,40" \ "#65: 1,0.6,12,32,8,-11" \ "#66: 17,1,27.6,3,2,6 (3)" \ "#67: 1,0.6,12,-400,1,270" \ "#68: 1.05,1.1,24,0.4,3.5,0.87" \ "#69: 1.5,2,2,2,1.7,6" \ "#70: 1.11,1.1,24,0.4,5,1.12" \ "#71: 1.11,1.1,44,1.1,0.9,0.3" \ "#72: 1,1.1,24,0.4,3.5,0.87" \ "#73: 1,1.3,27.6,3,1,6 (3)" \ "#74: 1,1.4,24.5,3,1,6 (4)" \ "#75: 0.5,1.3,5.7,1,6,2 (4)" \ "#76: 1.5,2,9.9,1.8,0.8,4 (4)" \ "#77: 1,-0.67,22.3,1,1,40 (3)" visible =!@bCustom endparam float param a default = 1.19 visible = @bCustom endparam float param b default = 2.8 visible = @bCustom endparam float param m default = 32 visible = @bCustom endparam float param n1 default = 3 visible = @bCustom endparam float param n2 default = 0.9 visible = @bCustom endparam float param n3 default = 6 visible = @bCustom endparam int param iSweeps Caption="Sweeps" default = 1 min=1 max=100 visible = @bCustom endparam heading Caption="Shape Modifiers" endheading float param fStretchXY Caption = "Stretch (X/Y)" default = 1.0 hint="Changes the aspect ratio of the shape." endparam float param fRotation Caption = "Rotation (degrees)" default = 0 hint="Rotates the shape from -180 to 180 degrees" max = 180 min = -180 endparam float param fScale Caption = "Scale" default = 1.0 hint="Scales the shape" min = .00001 endparam bool param bMirror Caption = "Mirror" default = false hint = "Mirrors across a specified angle" endparam float param fMirAngle Caption = "Mirror Angle" default = 0 min = -360 max = 360 visible = @bMirror endparam float param fRightClip Caption = "Clip Outside" default = 0 max = 1 min = 0 hint="Clips at the right of the gradient" endparam float param fLeftClip Caption = "Clip Inside" max = 1 min = 0 default = 0 hint="Clips at the left of the gradient" endparam ; bool param bOutputParameters ; Caption = "Output Parameters" ; default = false ; endparam int param iVersion default = 1 visible = false endparam } ;============================================================ ;============================================================ ; ; F L O W E R S H A P E D G R A D I E N T ; ;============================================================ ;============================================================ Flower_Shaped_Gradient { ; An extended version of an n-leaved rose (pinch) shape - There are ; 60+ base shapes hard coded with the parameters being delta values ; from the base shapes. global: float fXCenter, float fYCenter if (@bUseCenter) fXCenter = real(#center) fYCenter = imag(#center) else fXCenter = 0 fYCenter = 0 endif ; True if function list is set to 'ident' bool bTwstF = (@funcTwist (1.5) == 1.5) bool bMF1 = (@funcShapeMod1(1.5) == 1.5) bool bMF2 = (@funcShapeMod2(1.5) == 1.5) init: loop: final: ;Translate for Use Screen Center float x = real(#pixel) - fXCenter float y = (imag(#pixel) - fYCenter)*@fStretchXY float fPointDist = sqrt(x^2 + y^2) ; Angle to point float fTheta = atan2(x + flip(y))+(@fRotation/180*#pi) ;------ Code shared with plugin ------ ; --- Initialize default values --- float fLbs = 0.0 ; Lobes float fTwst = 0.0 ; Twist float fTwstF = fPointDist ; Twist Function float fBlg = 1.0 ; Buldge float fThk = 1.0 ; Lobe Thickness float fBlm = 1.0 ; Bloom float fWF = 0.0 ; Wave Frequency float fWA = 0.0 ; Wave Amplitude float fWS = 0.0 ; Wave Skew float fRF = 0.0 ; Ridges Frequency float fRA = 0.0 ; Ridges Amplitude float fOsc = 0.0 ; Oscillator Frequency int iMF1 = 0 ; Index for Mod Function 1 float fO = sin(fTheta*(@fOscFreq)) float fMF1 = 1111.1 ; Mod Function 1 [HACK Alert] float fMF2 = fTheta ; Mod Function 2 if (@enShape == "Shape #0") fLbs = 4 elseif (@enShape == "Shape #1: Null") if (@fLobes == 0), fLbs = 1.0, endif ; Force at leaset one lobe elseif (@enShape == "Shape #2") fLbs = 3, fRF = 8, fRA = 1 elseif (@enShape == "Shape #3") fLbs = 5, fThk = .2 elseif (@enShape == "Shape #4") fLbs = 16, fThk = 5 elseif (@enShape == "Shape #5") fLbs = 16, fThk = 5, iMF1 = 1 elseif (@enShape == "Shape #6") fLbs = 16, fThk = 5, iMF1 = 2 elseif (@enShape == "Shape #7") fLbs = 12, fThk = 5, iMF1 = 3 elseif (@enShape == "Shape #8") fLbs = 6, fThk = 10, fRF = 12, fRA = 1 elseif (@enShape == "Shape #9") fLbs = 5, fRF = 5, fRA = 3 elseif (@enShape == "Shape #10") fLbs = 3, fThk = 4, fRF = 8, fRA = 2, fTwst = 1.8, iMF1 = 4 elseif (@enShape == "Shape #11") fLbs = 3, fRF = 4, fRA = 15, fWF = 2, fWA = 4 elseif (@enShape == "Shape #12") fLbs = 3, fBlm = .4, fRF = 4, fRA = 15, fWF = 2, fWA = 4, fTwst = .2, fOsc = 44, iMF1 = 3 elseif (@enShape == "Shape #13") fLbs = 2, fBlm = 1.6, fBlg = .5, fTwst = 2, fTwstF = exp(fPointDist) elseif (@enShape == "Shape #14") fLbs = 24, fTwst = 1.5 elseif (@enShape == "Shape #15") fLbs = 5, fThk = 3, fBlg = .8, iMF1 = 6 elseif (@enShape == "Shape #16") fLbs = 3, fBlm = 3, fBlg = 2.4, fTwst = -2.3, fOsc = 3 elseif (@enShape == "Shape #17") fLbs = 4, fThk = .1, fBlg=.5, iMF1 = 5 elseif (@enShape == "Shape #18") fLbs = 2, fThk = 5, fBlg = .6, fTwst = 2.5, fTwstF = log(fPointDist), fRF = 12, fRA=4 elseif (@enShape == "Shape #19") fLbs = 6, fMF2 = sqr(fTheta) elseif (@enShape == "Shape #20") fLbs = 20, fBlm = 2, fThk = 3.7, fBlg = 1.7, fRF = 12, fRA = 2 elseif (@enShape == "Shape #21") fLbs = 16, fWF = 4, fWA = 4 elseif (@enShape == "Shape #22") fLbs = 3, fBlg=-1, fTwst = 1.8, fRF=8, fRA=2, iMF1 = 1 elseif (@enShape == "Shape #23") fLbs = 16, fBlg = .5, fTwst = 3 elseif (@enShape == "Shape #24") fLbs = 32, fTwst = 1.5, fWF = 12, fWA=4, fOsc = 64 elseif (@enShape == "Shape #25") fLbs = 3, fBlm = 3, fTwst = -2.3, fTwstF = sqr(fPointDist), fOsc = 3, fRF=12, fRA=4 elseif (@enShape == "Shape #26") fLbs = 32, fBlg=.5 elseif (@enShape == "Shape #27") fLbs = 3, fBlg=-1, fTwst = 1.8, fRF=8, fRA=2, iMF1 = 1, fMF2 = log(fTheta) elseif (@enShape == "Shape #28") fLbs = 16, fBlg = .5, fTwst = 3, fWF = 8, fWA = 12 elseif (@enShape == "Shape #29") fLbs = 4, fTwst = 1.5, fWF = 12, fWA=4, fOsc = 64 elseif (@enShape == "Shape #30") fLbs = 1, fTwst = 10, fBlg = .5, fBlm = 1.2 elseif (@enShape == "Shape #31") fLbs = 16, fWF = 4, fWA = 4, fBlg = .47, iMF1 = 6 elseif (@enShape == "Shape #32") fLbs = 5, fRF = 12, fRA = 2, fOsc = 5, iMF1 = 3 elseif (@enShape == "Shape #33") fLbs = 32, fThk = 3, fBlg = 2, fTwst = .5, fTwstF = sqr(fPointDist), fWF = 4, fWA = 2, fOsc = 32, iMF1 = 8 elseif (@enShape == "Shape #34") fLbs = 5, fTwst = .5, fTwstF = exp(fPointDist), fRF = 12, fRA = 2, fOsc = 5, iMF1 = 3, fWF = 2, fWA= 2 elseif (@enShape == "Shape #35") fLbs = 2, fBlm = .6, fThk = .1, fBlg = 1.2, fTwst = 2.0, fTwstF = cotanh(fPointDist), fWF=3, fWA = 12, iMF1 = 1 elseif (@enShape == "Shape #36") fLbs = 2, fThk = 5, fBlg = .6, fBlm = 1.5, fTwst = 2.5, fTwstF = log(fPointDist), fRF = 12, fRA=4, fWF = 22, fWA = 8 elseif (@enShape == "Shape #37") fLbs = 5, fThk = 11, fBlg = .7, fRF = 4, fRA = 12 elseif (@enShape == "Shape #38") fLbs = 32, fThk = 3, fBlg = 2, fTwst = 1, fTwstF = sqr(fPointDist), fRF = 8, fRA = 24, fOsc = 32, iMF1 = 8 elseif (@enShape == "Shape #39") fLbs = 5, fRF = 12, fRA = 2, fOsc = 5, iMF1 = 7, fWF = 2, fWA= 2 elseif (@enShape == "Shape #40") fLbs = 3, fBlm = 1.75, fTwst = 1, fTwstF = real(asin(fPointDist + flip(0))), fOsc = 44, iMF1 = 9 elseif (@enShape == "Shape #41") fLbs = 5, fThk = 3, fBlm = 1.4, fBlg = .4, fTwst = -1, fMF2 = sin(fTheta), iMF1 = 10 elseif (@enShape == "Shape #42") fLbs = 5, fThk = -2.5, fBlg = 0.5, fTwst = 3, fTwstF = sin(fPointDist), fRF = 11, fRA = 4, fWF = 4, fWA = 5 elseif (@enShape == "Shape #43") fLbs = 32, fTwst = 1.5, fWF = 12, fWA=4 elseif (@enShape == "Shape #44") fLbs = 6, fWA=4, iMF1 = 6, fMF2 = log(fTheta) elseif (@enShape == "Shape #45") fLbs = 3, fThk = -1.4, fTwst = 3, fTwstF = cotanh(fPointDist) elseif (@enShape == "Shape #46") fLbs = 2, fBlm = .6, fBlg = 1.8, fThk = -1.4, fTwst = 3, fTwstF = 0, fRF = 12, fRA=12 elseif (@enShape == "Shape #47") fLbs = 2, fThk = -.01, fTwst = 3, fRF = 12, fRA=12 elseif (@enShape == "Shape #48") fLbs = 3, fBlm = 10, fBlg = -2, fRF = 4, fRA = 4, fWF = 4, fWA = 4 elseif (@enShape == "Shape #49") fLbs = 6, fWA=4, iMF1 = 6, fMF2 = log(fTheta), fTwst = 3 elseif (@enShape == "Shape #50") fLbs = 2, fBlm = .6, fBlg = 1.8, fThk = -1.4, fTwst = 3, fOsc = 2, fRF = 12, fRA=10, fMF2 = cos(fTheta) elseif (@enShape == "Shape #51") fLbs = 3, fBlm = 1.5, fBlg = -.85, fTwst = 1, fRF = 4, fRA = 4, fWF = 4, fWA = 4, iMF1 = 1 elseif (@enShape == "Shape #52") fLbs = 2.5, fRF = 4, fRA = 1, fMF2 = sqr(fTheta) elseif (@enShape == "Shape #53") fLbs = 6, fBlm = 24, fThk = .1, fBlg = 2, fTwst = 5, fTwstF = sin(fPointDist), fOsc = 6 elseif (@enShape == "Shape #54") fLbs = 3, fThk = -1.4, fTwst = 3, fTwstF = atan(fPointDist), fOsc = 3 elseif (@enShape == "Shape #55") fLbs = 6, fWA=4, iMF1 = 6, fMF2 = log(fTheta), fTwst = 3, fTwstF = cos(fPointDist) elseif (@enShape == "Shape #56") fLbs = 2, fBlm = .6, fBlg = 1.8, fThk = -1.4, fTwst = 3, fOsc = 2, fRF = 12, fRA=10, fMF2 = 0 elseif (@enShape == "Shape #57") fLbs = 3, fBlm = 10, fBlg = -2, fRF = 4, fRA = 4, fWF = 4, fWA = 4, iMF1 = 1 elseif (@enShape == "Shape #58") fLbs = 3, fBlg = 2, fRF = 4, fRA = 11, fWF = 4, fWA = 22, fWS = -1 elseif (@enShape == "Shape #59") fLbs = 3, fTwst = 1, fRF = 12, fRA = 4, fWF = 4, fWA = 22, fOsc = 3, iMF1 = 1 elseif (@enShape == "Shape #60") fLbs = 4, fThk = .2, fBlm = 1.5, fWF = 5, fWA = 5, fWS = -1.5 endif ; Avoid divide by zero if ((fBlm + @fBloom) == 0) fBlm = fBlm + .0001 endif ; Shape mod 2 ; If function set to 'ident' if (bMF2) fTheta = fMF2 else fTheta = real(@funcShapeMod2(fTheta)) endif ; Twist function ; If function not set to 'ident' if (!bTwstF) fTwstF = real(@funcTwist(fPointDist)) endif ;Twist fTheta = fTheta + fTwstF * (fTwst + @fTwist) if (fTheta < 0), fTheta = fTheta+2*#pi, endif if (fTheta > 2*#pi), fTheta = fTheta-2*#pi, endif ;Bulge float fPointDist = fPointDist^(@fBulge + fBlg) ;Waves fTheta = fTheta + (fWA + @fWaveAmp)/100*fPointDist^(fWS + @fWaveSkew)*real(sin(fPointDist*(fWF + @fWaveFreq)*2*#pi)) ;Oscillator float fO = sin(fTheta*(fOsc + @fOscFreq)) ; Shape mod 1 if (!bMF1) ; Overriden if (fO > 0) fMF1 = real(@funcShapeMod1(abs(cos((fLbs + @fLobes)*fTheta*0.5)))) else fMF1 = real(@funcShapeMod1(abs(sin((fLbs + @fLobes)*fTheta*0.5)))) endif else ; Base shape if (fO > 0) float fT = abs(cos((fLbs + @fLobes)*fTheta*0.5)) else float fT = abs(sin((fLbs + @fLobes)*fTheta*0.5)) endif if (iMF1 == 0) ; ident fMF1 = fT elseif (iMF1 == 1) ; exp fMF1 = exp(fT) elseif (iMF1 == 2) ; acos fMF1 = acos(fT) elseif (iMF1 == 3) ; atanh fMF1 = atanh(fT) elseif (iMF1 == 4) ; log fMF1 = log(fT) elseif (iMF1 == 5) ; cos fMF1 = cos(fT) elseif (iMF1 == 6) ; asin fMF1 = asin(fT) elseif (iMF1 == 7) ; cotanh fMF1 = cotanh(fT) elseif (iMF1 == 8) ; recip fMF1 = recip(fT) elseif (iMF1 == 9) ; tan fMF1 = tan(fT) elseif (iMF1 == 10) ; sin fMF1 = sin(fT) endif endif ; Calc shape float fIndex = real((((fPointDist)))) / fMF1^(1/(fThk + @fThick))/(fBlm + @fBloom) ; Ridges fIndex = fIndex - (fRA + @fRidgesAmp)/100*real(sin(fTheta*(fRF + @fRidgesFreq)*2*#pi)) ;------ End shared code with plugin ------ #index = fIndex default: title = "Flower Shaped Gradient" bool param bUseCenter caption = "Use Screen Center" default = true hint="When 'Use Screen Center' is turned off, the shape is centered \ around 0,0." endparam float param fStretchXY Caption = "Stretch (X/Y)" default = 1.0 hint="Changes the aspect ratio of the shape." endparam float param fRotation Caption = "Rotation (degrees)" default = 0 hint="Rotates the shape from -360 to 360 degrees" max = 360 min = -360 endparam ;------ Code shared with plugin ------ param enShape caption = "Base Shapes" enum="Shape #0" "Shape #1: Null" "Shape #2" "Shape #3" "Shape #4" \ "Shape #5" "Shape #6" "Shape #7" "Shape #8" "Shape #9" \ "Shape #10" "Shape #11" "Shape #12" "Shape #13" "Shape #14" \ "Shape #15" "Shape #16" "Shape #17" "Shape #18" "Shape #19" \ "Shape #20" "Shape #21" "Shape #22" "Shape #23" "Shape #24" \ "Shape #25" "Shape #26" "Shape #27" "Shape #28" "Shape #29" \ "Shape #30" "Shape #31" "Shape #32" "Shape #33" "Shape #34" \ "Shape #35" "Shape #36" "Shape #37" "Shape #38" "Shape #39" \ "Shape #40" "Shape #41" "Shape #42" "Shape #43" "Shape #44" \ "Shape #45" "Shape #46" "Shape #47" "Shape #48" "Shape #49" \ "Shape #50" "Shape #51" "Shape #52" "Shape #53" "Shape #54" \ "Shape #55" "Shape #56" "Shape #57" "Shape #58" "Shape #59" \ "Shape #60" ;"Shape #61" "Shape #62" "Shape #63" "Shape #64" \ ;"Shape #65" "Shape #66" "Shape #67" "Shape #68" "Shape #69" default = 0 endparam float param fLobes caption = "Lobes +/-" default = 0 hint = "The number of 'petals' in the 'flower.'" endparam float param fThick Caption = "Lobe thickness +/-" default = 0.0 hint="Varies the thickness of individual petals." endparam float param fBloom Caption = "Bloom +/-" default = 0.0 hint="Scales the shape sometimes revealing/expanding details." endparam float param fBulge Caption = "Bulge +/-" default = 0.0 hint = "Buldge out the shape." endparam float param fTwist caption = "Twist +/-" default = 0 hint = "Spirals the petals." endparam func funcTwist caption = "Twist function override" default = ident() hint="Varies the amount of twist by the function applied to the distance." endfunc float param fRidgesFreq Caption = "Ridges Frequency +/-" default = 0.0 hint = "Adds ridges/lines to the petals." endparam float param fRidgesAmp Caption = "Ridges Power +/-" default = 0.0 endparam float param fWaveFreq Caption = "Waves Frequency +/-" default = 0.0 hint = "Adds waves to the petals." endparam float param fWaveAmp Caption = "Waves Power +/-" default = 0.0 endparam float param fWaveSkew Caption = "Wave Dist. Skew +/-" default = 0.0 hint="Skews waviness to the outside or inside of the flower." endparam float param fOscFreq Caption = "Oscillator Frequency +/-" default = 0.0 hint="Combines two out-of-phase versions of the flower. Values equal to the \ number of lobes and values in the range 40-200 are often interesting." endparam func funcShapeMod1 caption = "Shape Modify 1 override" default = ident() endfunc func funcShapeMod2 caption = "Shape Modify 2 override" default = ident() endfunc int param iVersion default = 1 visible = false endparam ;------ End shared code with plugin ------ float param fRightClip Caption = "Clip Outside" default = 0 max = 1 min = 0 hint="Clips at the right of the gradient (usually the outside of the shape)." endparam float param fLeftClip Caption = "Clip Inside" max = 1 min = 0 default = 0 hint="Clips at the left of the gradient (usually the inside of the shape)." endparam } ;########################### ; ; SingleShape ; ;########################## ; ; Simple UCL that allows the plug-in of a single shape. ; SingleShape { global: import "common.ulb" import "rkb.ulb" TrapShape Shape = new @shape(0) init: final: complex z1 if (@bUseCenter) z1 = #z - #center else z1 = #z endif float fIndex = Shape.Iterate(z1) fIndex = fIndex / @fScale if ((@fLClip > 0.0) && (fIndex < @fLClip)) #solid = true endif if ((@fRClip < 1.0) && (fIndex > @fRClip)) #solid = true endif #index = fIndex default: Title = "Single Shape" bool param bUseCenter caption = "Use Screen Center" default = true hint = "When 'Use Screen Center' is turned off, the shape is centered \ around 0,0." endparam float param fScale caption = "Scale" default = 1.0 min = 0.000001 endparam float param fLClip caption = "Clip Left (Inside)" default = 0.0 endparam float param fRClip caption = "Clip Right (Outside)" default = 1.0 endparam TrapShape param shape caption = "Trap Shape" default = RKB_TrapShapeFlower hint = "Selects the shape to be used." endparam } ;=========================================================== ;=========================================================== ; ; SSG ; ;=========================================================== ;=========================================================== SSG { ; Written by Robert Bunney ; Creates shapes based on the equation named 'Superformula' global: ; Image width and height in fractal coords (not pixel) units float fImageWidth, float fImageHeight float fXCenter, float fYCenter ; resolution in pixels float fXRes = real(#screenmax) float fYRes = imag(#screenmax) * @fStretchXY float fMag = 1 if (@bConstMag) fMag = #Magn endif if (round(fXRes) == round(fYRes)) fImageWidth = 4.0 /fMag * @fStretchXY fImageHeight = 4.0 /fMag elseif (fYRes > fXRes) fImageWidth = 4.0/fMag fImageHeight = 4.0*fYRes/fXRes/fMag if (@fStretchXY > 1.0) fImageWidth = fImageWidth * @fStretchXY elseif (@fStretchXY < 1.0) fImageHeight = fImageHeight / @fStretchXY endif else fImageHeight = 3.0/fMag fImageWidth = 3.0*fXRes/fYRes/fMag if (@fStretchXY > 1.0) fImageHeight = fImageHeight / @fStretchXY elseif (@fStretchXY < 1.0) fImageWidth = fImageWidth * @fStretchXY endif endif if (@bUseCenter) fXCenter = real(#center) fYCenter = imag(#center) else fXCenter = 0 fYCenter = 0 endif float fMaxDist = sqrt((fImageWidth/2)^2 + (fImageHeight/2)^2) float a=0, float b=0, float m=0, float n1=0, float n2=0, float n3=0 float fTw = 0 ; Twist float fRA = 0 ; Ridges Amp float fRF = 0 ; Ridges Freq float fWA = 0 ; Waves Amp float fWF = 0 ; Waves Freq float fDP = 1 ; Vary wave by distance (Distance Power) int s = 1 if (@enShape == "Shape #0") a=1, b=1.1, m=24, n1=1.7, n2=0.7, n3=6 elseif (@enShape == "Shape #1: Null") ;Default params elseif (@enShape == "Shape #2") a=-2.6, b=1.1, m=8, n1=1.7, n2=0.7, n3=9.6 elseif (@enShape == "Shape #3") a=24, b=1.1, m=16, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "Shape #4") a=24, b=1.1, m=8, n1=0.5, n2=0.7, n3=0 elseif (@enShape == "Shape #5") a=1, b=1, m=7, n1=3, n2=6, n3=6 elseif (@enShape == "Shape #6") a=6.5, b=1.1, m=8, n1=0.5, n2=0.7, n3=0.0 elseif (@enShape == "Shape #7") a=5, b=1.1, m=8, n1=0.5, n2=1.9, n3=0 elseif (@enShape == "Shape #8") a=-1.3, b=1.1, m=8, n1=1.7, n2=4, n3=0 elseif (@enShape == "Shape #9") a=-5, b=1.1, m=10, n1=0.54, n2=1, n3=0 elseif (@enShape == "Shape #10") a=-5, b=1, m=10, n1=0.5, n2=2, n3=0 elseif (@enShape == "Shape #11") a=1, b=1, m=3, n1=5, n2=18, n3=18 elseif (@enShape == "Shape #12") a=1, b=1, m=6, n1=20, n2=7, n3=18 elseif (@enShape == "Shape #13") a=1, b=1, m=4, n1=2, n2=1, n3=3 elseif (@enShape == "Shape #14") a=1, b=1, m=8, n1=3, n2=4, n3=17 elseif (@enShape == "Shape #15") a=1, b=0.6, m=12, n1=32, n2=1, n3=-11 elseif (@enShape == "Shape #16") a=0.3, b=1.01, m=-8.1, n1=1, n2=1, n3=150, s=6 elseif (@enShape == "Shape #17") a=1, b=1, m=19, n1=9, n2=14, n3=13 elseif (@enShape == "Shape #18") a=1.5, b=2, m=8, n1=0.9, n2=1.8, n3=0.8 elseif (@enShape == "Shape #19") a=1.6, b=1, m=12, n1=1.5, n2=2, n3=7.5 elseif (@enShape == "Shape #20") a=2.7, b=2.6, m=6, n1=12, n2=8.3, n3=5.3 elseif (@enShape == "Shape #21") a=1.5, b=2, m=2, n1=1.7, n2=0.7, n3=2 elseif (@enShape == "Shape #22") a=1.19, b=2.8, m=32, n1=3, n2=0.9, n3=6 elseif (@enShape == "Shape #23") a=0.9, b=10, m=4, n1=4.2, n2=17, n3=1.5 elseif (@enShape == "Shape #24") a=1, b=1, m=3, n1=4.5, n2=10, n3=10 elseif (@enShape == "Shape #25") a=1, b=1, m=4, n1=12, n2=15, n3=15 elseif (@enShape == "Shape #26") a=1, b=1, m=7, n1=10, n2=6, n3=6 elseif (@enShape == "Shape #27") a=0.3, b=1, m=-8.5, n1=1, n2=1, n3=140, s=4 elseif (@enShape == "Shape #28") a=10, b=10, m=5, n1=1, n2=7, n3=7 elseif (@enShape == "Shape #29") a=1, b=1, m=12, n1=15, n2=20, n3=3 elseif (@enShape == "Shape #30") a=1, b=1, m=8, n1=1, n2=1, n3=8 elseif (@enShape == "Shape #31") a=0.3, b=1.01, m=-8.5, n1=1, n2=1, n3=160, s=4 elseif (@enShape == "Shape #32") a=1, b=1, m=5, n1=2, n2=6, n3=6 elseif (@enShape == "Shape #33") a=1, b=1, m=6, n1=1, n2=1, n3=6 elseif (@enShape == "Shape #34") a=1, b=1, m=3, n1=6, n2=6, n3=6 elseif (@enShape == "Shape #35") a=1, b=1, m=2, n1=1, n2=1, n3=1 elseif (@enShape == "Shape #36") a=1, b=1, m=2, n1=1, n2=4, n3=8 elseif (@enShape == "Shape #37") a=1, b=1, m=8, n1=7, n2=8, n3=2 elseif (@enShape == "Shape #38") a=1, b=1, m=1, n1=1, n2=1, n3=1 elseif (@enShape == "Shape #39") a=1, b=1, m=2, n1=1, n2=1, n3=-1.27 elseif (@enShape == "Shape #40") a=1, b=1, m=3, n1=1, n2=1, n3=1 elseif (@enShape == "Shape #41") a=1, b=1, m=4, n1=1, n2=1, n3=1 elseif (@enShape == "Shape #42") a=17, b=1, m=27.6, n1=24, n2=2, n3=6, s=4 elseif (@enShape == "Shape #43") a=1, b=1, m=6, n1=1, n2=1, n3=1 elseif (@enShape == "Shape #44") a=1, b=1, m=1, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "Shape #45") a=1, b=1, m=2, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "Shape #46") a=1, b=1, m=3, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "Shape #47") a=1, b=1, m=4, n1=0.3, n2=0.3, n3=0.3 elseif (@enShape == "Shape #48") a=1.9, b=2.8, m=32, n1=3, n2=0.9, n3=0.6 elseif (@enShape == "Shape #49") a=1, b=0.85, m=2, n1=-3, n2=1, n3=20 elseif (@enShape == "Shape #50") a=1, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "Shape #51") a=0.4, b=0.85, m=22, n1=-0.11, n2=0.9, n3=4 elseif (@enShape == "Shape #52") a=1, b=1.2, m=24, n1=2, n2=1, n3=4 elseif (@enShape == "Shape #53") a=1, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "Shape #54") a=-1.15, b=1.21, m=4, n1=-0.11, n2=3.77, n3=0.77 elseif (@enShape == "Shape #55") a=1.2, b=1.1, m=16, n1=0.5, n2=3.4, n3=0.9 elseif (@enShape == "Shape #56") a=1.2, b=1.2, m=4, n1=0.5, n2=3.5, n3=1 elseif (@enShape == "Shape #57") a=1, b=1, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "Shape #58") a=1.2, b=-2, m=8, n1=0.5, n2=9, n3=1 elseif (@enShape == "Shape #59") a=0.3, b=0.3, m=8, n1=0.3, n2=0.3, n3=0.6 elseif (@enShape == "Shape #60") a=1, b=1, m=1, n1=1, n2=1, n3=40 elseif (@enShape == "Shape #61") a=1.2, b=-2, m=4, n1=0.5, n2=9, n3=1 elseif (@enShape == "Shape #62") a=1, b=-0.67, m=22, n1=1, n2=1, n3=40 elseif (@enShape == "Shape #63") a=1, b=0.6, m=12, n1=32, n2=1, n3=40 elseif (@enShape == "Shape #64") a=1, b=0.6, m=12, n1=32, n2=400, n3=40 elseif (@enShape == "Shape #65") a=1, b=0.6, m=12, n1=32, n2=8, n3=-11 elseif (@enShape == "Shape #66") a=17, b=1, m=27.6, n1=3, n2=2, n3=6, s=3 elseif (@enShape == "Shape #67") a=1, b=0.6, m=12, n1=-400, n2=1, n3=270 elseif (@enShape == "Shape #68") a=1.05, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "Shape #69") a=1.2, b=2, m=2, n1=2, n2=1.7, n3=6 elseif (@enShape == "Shape #70") a=1.11, b=1.1, m=24, n1=0.4, n2=5, n3=1.12 elseif (@enShape == "Shape #71") a=1.11, b=1.1, m=44, n1=1.1, n2=0.9, n3=0.3 elseif (@enShape == "Shape #72") a=1, b=1.1, m=24, n1=0.4, n2=3.5, n3=0.87 elseif (@enShape == "Shape #73") a=1, b=1.3, m=27.6, n1=3, n2=1, n3=6, s=3 elseif (@enShape == "Shape #74") a=1, b=1.4, m=24.5, n1=3, n2=1, n3=6, s=4 elseif (@enShape == "Shape #75") a=0.5, b=1.3, m=5.7, n1=1, n2=6, n3=2, s=4 elseif (@enShape == "Shape #76") a=1.5, b=2, m=9.9, n1=1.8, n2=0.8, n3=4, s=4 elseif (@enShape == "Shape #77") a=1, b=-0.67, m=22.3, n1=1, n2=1, n3=40, s=3 elseif (@enShape == "Shape #78") a=-0.8, b=1.1, m=8, n1=1.7, n2=4, n3=0 elseif (@enShape == "Shape #79") a=1, b=1, m=3, n1=5, n2=18, n3=18, fTw=0.85, fRF=4, fRA=4 elseif (@enShape == "Shape #80") a=0.3, b=1.01, m=-8.5, n1=1, n2=1, n3=160, s=4, fWA=2, fWF=2 elseif (@enShape == "Shape #81") a=24, b=1.1, m=16, n1=0.5, n2=0.7, n3=0, fRF=9.696, fRA=3 elseif (@enShape == "Shape #82") a=-4.22, b=1.1, m=10, n1=0.54, n2=.46, n3=7.6, fRF=22, fRA=1 elseif (@enShape == "Shape #83") a=1, b=1, m=22, n1=2, n2=1, n3=40, fWF=2, fWA=2, fDP=-2 elseif (@enShape == "Shape #84") a=0.3, b=1.01, m=-5.85, n1=1, n2=1, n3=150, s=6, fWF=2, fWA=2 elseif (@enShape == "Shape #85") a=0.03, b=2, m=2, n1=1.7, n2=0.7, n3=2, fWF=2, fWA=4 elseif (@enShape == "Shape #86") a=1.6, b=10, m=4, n1=4.2, n2=17, n3=1.5, fTw=1.7 elseif (@enShape == "Shape #87") a=1, b=1.1, m=8, n1=0.4, n2=0.7, n3=6 elseif (@enShape == "Shape #88") a=17, b=0.64, m=27.6, n1=24, n2=2, n3=6, s=4 elseif (@enShape == "Shape #89") a=1.2, b=-2, m=8, n1=0.5, n2=9, n3=1, fRF=5.25, fRA=6 elseif (@enShape == "Shape #90") a=1, b=1.21, m=4, n1=-0.11, n2=3.77, n3=2, fTw=1.6 elseif (@enShape == "Shape #91") a=1, b=1, m=20, n1=1, n2=1, n3=40, fWF=4.0, fWA=4.0, fDP=-1.5 elseif (@enShape == "Shape #92") a=1, b=0.6, m=10, n1=32, n2=1, n3=40, fTw=1 elseif (@enShape == "Shape #93") a=1, b=0.6, m=12, n1=32, n2=8, n3=-11, fRF=11, fRA=2 elseif (@enShape == "Shape #94") a=1, b=0.6, m=12, n1=-400, n2=1, n3=270, fRF=11, fRA=1, fWF=4, fWA=1, fDP=-2 elseif (@enShape == "Shape #95") a=0.5, b=1.3, m=5.7, n1=-1.4, n2=6, n3=2, s=4, fWF=-4, fWA=3, fDP=-2 elseif (@enShape == "Shape #96") a=1, b=0.6, m=10, n1=32, n2=1, n3=-11, fRF=11, fRA=0.5 elseif (@enShape == "Shape #97") a=2.1, b=2, m=8, n1=0.9, n2=1.8, n3=0.8, fRF=2.58, fRA=6 elseif (@enShape == "Shape #98") a=1, b=1, m=3, n1=4.5, n2=10, n3=10, fTw=1.6, fRF=2.55, fRA=1 elseif (@enShape == "Shape #99") a=1, b=1.07, m=22, n1=-0.11, n2=0.9, n3=4, fTw=-0.65, fWF=2.0, fWA=6.0 endif float fInc = #pi/180 ; 360 tests float fRMin = 999999999 float fRMax = -999999999 a=a+@a, b=b+@b, m=m+@m, n1=n1+@n1, n2=n2+@n2, n3=n3+@n3 s = s+@iSweeps fTw = fTw + @fTwist fRA = fRA + @fRidgesAmp fRF = fRF + @fRidgesFreq fWA = fWA + @fWaveAmp fWF = fWF + @fWaveFreq fDP = fDP + @fDistPower ; Figure out maximum size (with some certainty) float fEnd = #pi*2 while (fEnd > 0) float rr rr = (abs((cos(m * fEnd/4)/a)^n2) + ((abs(sin(m * fEnd/4)/b))^n3))^(-1.0/n1) if (rr > fRMax), fRMax = rr, endif if (rr < fRMin), fRMin = rr, endif fEnd = fEnd - fInc endwhile init: loop: final: float x = real(#pixel) - fXCenter float y = (imag(#pixel) - fYCenter)*@fStretchXY float fTheta = atan(y/x)+@fRotation if (x < 0.0), fTheta = fTheta + #pi, endif if (fTheta == 0), fTheta = .001, endif fTheta = real(@funcShapeMod1(fTheta)) float fPointDist = sqrt(x^2 + y^2) ;Twist fTheta = fTheta + real(@funcTwist(fPointDist)) * fTw ;Waves float fDistMult = 1.0 fDistMult = fPointDist^fDP fTheta = fTheta + fWA/100*fDistMult*real(sin(fPointDist*fWF*2*#pi)) float rT float r = -999999999 int i = 1 while (i <= s) i = i+1 rT = (abs((cos(m * real(@funcShapeMod2(fTheta))/4)/a)^n2) + ((abs(sin(m * real(@funcShapeMod2(fTheta))/4)/b))^n3))^(-1/n1) if (rT > r), r = rT, endif fTheta = fTheta + 2*#pi endwhile float fIndex = (fPointDist/((r)*(fMaxDist/fRMax)))/@fScale ; Ridges fIndex = fIndex - fRA/100*real(sin(fTheta*fRF*2*#pi)) ; Inner and Outer clipping if ((@fRightClip > 0) && (fIndex > (1-@fRightClip))) #solid = true endif if ((@fLeftClip > 0) && (fIndex < @fLeftClip)) #solid = true endif #index = fIndex default: title = "SSG" bool param bUseCenter caption = "Use Screen Center" default = true hint="When 'Use Screen Center' is turned off, the shape is centered \ around 0,0." endparam bool param bConstMag caption = "Constant Magnification" default = true hint="Prevents zooming or changing magnification when turned on." endparam heading Caption="Shape Parameters" endheading param enShape caption = "Base Shape" enum="Shape #0" "Shape #1: Null" "Shape #2" "Shape #3" "Shape #4" \ "Shape #5" "Shape #6" "Shape #7" "Shape #8" "Shape #9" \ "Shape #10" "Shape #11" "Shape #12" "Shape #13" "Shape #14" \ "Shape #15" "Shape #16" "Shape #17" "Shape #18" "Shape #19" \ "Shape #20" "Shape #21" "Shape #22" "Shape #23" "Shape #24" \ "Shape #25" "Shape #26" "Shape #27" "Shape #28" "Shape #29" \ "Shape #30" "Shape #31" "Shape #32" "Shape #33" "Shape #34" \ "Shape #35" "Shape #36" "Shape #37" "Shape #38" "Shape #39" \ "Shape #40" "Shape #41" "Shape #42" "Shape #43" "Shape #44" \ "Shape #45" "Shape #46" "Shape #47" "Shape #48" "Shape #49" \ "Shape #50" "Shape #51" "Shape #52" "Shape #53" "Shape #54" \ "Shape #55" "Shape #56" "Shape #57" "Shape #58" "Shape #59" \ "Shape #60" "Shape #61" "Shape #62" "Shape #63" "Shape #64" \ "Shape #65" "Shape #66" "Shape #67" "Shape #68" "Shape #69" \ "Shape #70" "Shape #71" "Shape #72" "Shape #73" "Shape #74" \ "Shape #75" "Shape #76" "Shape #77" "Shape #78" "Shape #79" \ "Shape #80" "Shape #81" "Shape #82" "Shape #83" "Shape #84" \ "Shape #85" "Shape #86" "Shape #87" "Shape #88" "Shape #89" \ "Shape #90" "Shape #91" "Shape #92" "Shape #93" "Shape #94" \ "Shape #95" "Shape #96" "Shape #97" "Shape #98" "Shape #99" default = 0 endparam float param a caption="a +/-" default = 0 endparam float param b caption="b +/-" default = 0 endparam float param m caption="m +/-" default = 0 hint="Increasing values tends to increase the number of 'arms' or 'lobes' in the shape." endparam float param n1 caption="n1 +/-" default = 0 endparam float param n2 caption="n2 +/-" default = 0 endparam float param n3 caption="n3 +/-" default = 0 endparam int param iSweeps Caption="Sweeps" default = 0 min=0 max=100 endparam heading Caption="Shape Modifiers" endheading float param fStretchXY Caption = "Stretch (X/Y)" default = 1.0 hint="Changes the aspect ratio of the shape." endparam float param fRotation Caption = "Rotation (Radians)" default = 0 hint="Rotates the shape from -180 to 180 degrees" max = 180 min = -180 endparam float param fScale Caption = "Scale" default = 1.0 hint="Scales the shape" min = .00001 endparam float param fTwist Caption = "Twist +/-" default = 0.0 hint="Twists the shape" endparam func funcTwist caption = "Twist Function" default = ident() hint="Varies the amount of twist by the function applied to the distance" endfunc float param fRidgesFreq Caption = "Ridges Frequency +/-" default = 0.0 endparam float param fRidgesAmp Caption = "Ridges Amplitude +/-" default = 0 endparam float param fWaveFreq Caption = "Waves Frequency +/-" default = 0 endparam float param fWaveAmp Caption = "Waves Amplitude +/-" default = 0 endparam float param fDistPower Caption = "Vary Wave by Distance +/-" default = 0.0 hint="The higher the value, the less waviness in the center of the flower. \ Negative values push the waviness to the center" endparam func funcShapeMod1 caption = "Shape Modify 1" default = ident() endfunc func funcShapeMod2 caption = "Shape Modify 2" default = ident() endfunc float param fRightClip Caption = "Clip Outside" default = 0 max = 1 min = 0 hint="Clips at the right of the gradient" endparam float param fLeftClip Caption = "Clip Inside" max = 1 min = 0 default = 0 hint="Clips at the left of the gradient" endparam int param iVersion default = 1 visible = false endparam }