home *** CD-ROM | disk | FTP | other *** search
Wrap
/* This genie will make a colour chart showing all the colours in the current palette. Note that starting a new document sets the palette back to the basic set. Pro Page and Pro Draw palette files are interchangeable. To load in a and make a chart of a palette, start a new document, select "Fill Color" from the "Draw" menu, and select one of the ProDraw palettes provided, or one you have created and saved. If you load in the PantoneColorsCV palette, you can print out a chart showing how all the ProPage selection of Pantone colours appears on your printer. This is NOT a proper book of Pantone samples, but a test of your printer, printer driver, and paper. However, it may be useful for reference. A chart of Focoltone colours will not show the relationships between the colours, which are the heart of the Focoltone system. To see these you will need the original Focoltone charts. Written by Don Cox ©1995. Not public domain. */ /* $VER: ColourChart May 95 */ /*call open("STDERR","ram:traceCC","W") trace r*/ cr = '0a'x call SafeEndEdit.rexx() call ppm_AutoUpdate(0) oldunits = ppm_GetUnits() call ppm_SetUnits(2) cmode = ppm_GetColorMode() call ppm_SetColorMode(0) prevdoc = ppm_GetDocName() if ppm_DocChanged() then do if ppm_SavedDate() = "Not Saved" then prevdoc = "" if ppm_Inform(2, "You must save the current document first. Should I save and continue?", "Cancel", "Ok") then call ppm_SaveDocument(prevdoc) else exit_msg("Aborted by User") prevdoc = ppm_GetDocName() end colorlist = ppm_GetColorList() parse var colorlist numcolors '0a'x colorlist formstring = "Rows:6"||cr||"Columns:4"||cr|| "Page width (mm):210"||cr||"Page height (mm):297"||cr||"Margin (mm):20" form = ppm_GetForm("Set sizes",12,formstring) if form = "" then exit_msg("Aborted by User") parse var form Rows '0a'x Columns '0a'x Pagewidth '0a'x Pageheight '0a'x margin PageWidth = PageWidth/10 PageHeight = PageHeight/10 margin= margin/10 UsedWidth = PageWidth-(margin*2) UsedHeight = PageHeight-(margin*2) SampleWidth = (UsedWidth*4)/((Columns*4)+(Columns-1)) /* 4 because gap is 1/4 of width; -1 because 1 less gaps than columns */ SampleHeight = (UsedHeight*3)/((Rows*3)+(Rows)) /* Same number of gaps as rows, because gaps are text boxes */ SampleArea = SampleWidth*SampleHeight TextHeight = SampleHeight*0.6 /* text box */ FontSize = 10*((SampleWidth+SampleHeight)/6) /* Arbitrary formula - bigger type for bigger samples */ FontSize = max(FontSize,6) FontSize = ppm_SetSize(FontSize) Sampleheight2 = Sampleheight*1.333 /* including spacing */ Samplewidth2 = Samplewidth * 1.25 SamplesPerPage = rows*columns Pages = numcolors % SamplesPerPage Leftover = numcolors // SamplesPerPage if Leftover>0 then Pages = Pages+1 message = " Making colour chart: page 1 of "pages call ppm_ShowStatus(message) thispage = ppm_DocLastPage() lastpage = thispage if thispage = 0 then thispage = ppm_CreatePage(1,1,1,1,0) do i=1 to pages /* Create a new page without adding a blank page at end of document */ newpage = ppm_CreatePage(thispage,1,1,0,0) newpage = ppm_MovePage(newpage+1,newpage) thispage = ppm_GoToPage(newpage+1) call ppm_SetPageSize(thispage, Pagewidth, Pageheight) do j= 1 to rows ypos = margin+(SampleHeight2*(j-1)) message = " Making colour chart: page "i" of "pages", row "j" of "rows" ..." call ppm_ShowStatus(message) do k= 1 to columns xpos = margin+(Samplewidth2*(k-1)) parse var colorlist thiscolor '0a'x colorlist if thiscolor ~="" then do box = ppm_CreateBox(xpos, ypos, Samplewidth, Sampleheight,0) call ppm_SetBoxFrameData(box, "Black", thiscolor, 2,1,1) call ppm_SetBoxFrame(box,1) TextTop = ypos+(SampleHeight*1.05) box = ppm_CreateBox(xpos, TextTop,SampleWidth, TextHeight,0) call ppm_SetBoxFrame(box,0) if right(thiscolor,2) = "CV" then do thiscolor = strip(thiscolor,"t","V") thiscolor = strip(thiscolor,"t", "C") end overflow = ppm_TextIntoBox(box, thiscolor) end end end end if lastpage = 0 then numgone = ppm_DeletePage(1,1) exit_msg: do parse arg message if message ~= '' then call ppm_Inform(1, message,"Resume" ) call ppm_ClearStatus() call ppm_SetUnits(oldunits) call ppm_SetColorMode(cmode) call ppm_AutoUpdate(1) exit end