home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / tools / workbench / backgroundv2.11 / docs / backprefs.doc.english < prev    next >
Encoding:
Text File  |  1997-05-19  |  18.7 KB  |  539 lines

  1. ›1m                              Backprefs›0m
  2.  
  3. ›1mBackground preferences editor›0m
  4.                              Backprefs v2.1
  5.  
  6. Backprefs and this text are Copyright ©1996 Roland Haas
  7.  
  8.  
  9. Contents:
  10.  
  11.    ›3mDisclaimer›0m
  12.    ›3mNeeded libraries›0m
  13.    ›3mKnown bugs›0m
  14.    ›3mHistory›0m
  15.    ›3mFuture›0m
  16.    ›3mAuthor›0m
  17.  
  18.    ›3mWhich pictures›0m
  19.    ›3mThe gadgets›0m
  20.    ›3mThe menus›0m
  21.  
  22.  
  23. ›1mCopyright, copying ...›0m
  24.  
  25. Copying
  26.  
  27. Backprefs may be distributed freely, as long as the contents of the archive
  28. remains unchanged. No charge may be raised other then a small fee for
  29. copying.
  30.  
  31. Backprefs may be sold with other free redistributable software, as long as the
  32. conditions above are satisfied. This program may only be included in a
  33. commercial package if you have the written permission of the `author.
  34.  
  35. disclaimer
  36.  
  37. This product is sold "AS IS" without representation or warranty of any kind,
  38. either expressed or implied.
  39.               YOU USE THIS PROGRAM ON YOUR OWN RISK
  40.  
  41.      INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  42.      NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  43.      OR RESPONSIBILITY IS ASSUMED.
  44.  
  45. Installer and Installer project icon
  46. (c) Copyright 1995-96 Escom AG. All Rights Reserved.
  47. Reproduced and distributed under license from escom AG.
  48.  
  49.  
  50. ›1m Libs›0m
  51.  
  52. The preferences editor needs 'gadutil.library' to run correctly. This file
  53. must be in your LIBS: directory. The install script should have done this
  54. for you.
  55.  
  56.  
  57. ›1m Fehler›0m
  58.  
  59. Currently no bugs are known to me.
  60.  
  61.  
  62. ›1mVersions until today›0m
  63.  
  64. NOTE: The version numbering starts at version 2.0. This program always gets
  65.     the same version number as th main program background. Using programs
  66.     with different version numbers will probably crash the machine.
  67.  
  68.    03.08.1996: V2.0  initial version
  69.    08.04.1997: V2.1  color adaption
  70.    18.05.1997: V2.11 removed some bugs
  71.  
  72. ›1mPlanned features›0m
  73.  
  74.    · Supporting parameters
  75.  
  76. Suggestions, bug reports to the ›3mAuthor›0m
  77.  
  78. ›1mThis is me›0m
  79.  
  80. Backprefs was coded during long nights by:
  81.  
  82.    Roland Haas
  83.    Mühlweg 16
  84.    77948 Friesenheim
  85.  
  86.    phone: ++49 07821/68084
  87.  
  88. the GUI was created with GadToolsBox v2.0.
  89.  
  90. Suggestion, gifts and  post cards are always welcome!
  91. A new and better version of this text would be especially welcome. Perhaps
  92. even a translation???
  93.  
  94.  
  95. ›1mWhich pictures can be used?›0m
  96.  
  97. Only pictures in the IFF-ILBM format can be loaded. The pictures _must_ use
  98. the same palette as the workbench. The pictures should have the same aspect
  99. ratio. E.g. if your workbench is HIRES/INTERLACED the picture should use the
  100. same viewmode or LORES/NONLACE. Always keep in mind that the pictures
  101. remain in memory; a 640x320 sized picture using eight colors will occupy
  102. 640*320*3/8 = 76800 byte CHIP-RAM. Also pictures must be loaded at program
  103. startup; if you are using many big pictures, this can take several seconds.
  104. So better use few little pictures setting the ›3mTILE flag›0m than many bigger
  105. ones. Starting with V2.1 you can ›3mload›0m pictures later, but this takes of
  106. course some time.
  107.  
  108.  
  109. ›1mBackground preferences›0m
  110.  
  111.                                                     ›3mLoaded Pictures:›0m
  112.           +---------------------------------+ +-+ +-----------------+-+
  113.  ›3m   Name ›0m | Work:Pictures/Disc              | |›3m?›0m| | Back1           |#|
  114.           +---------------------------------+ +-+ | Romantique      |#|
  115.           +---------------------------------+     | Disc            |#|
  116.  ›3mPattern ›0m | "(#? full, #? free              |     | Desert          |#|
  117.           +---------------------------------+     |                 |^|
  118.           +---------------------------------+     |                 |V|
  119.  ›3m   Task ›0m | WORKBENCH                       |     +-----------------+-+
  120.           +---------------------------------+     | Disc              |
  121.           +------------+                          +----+----+----+----+
  122.           |›3m    View    ›0m|                          |›3mAdd ›0m|›3mDel ›0m|›3m Up ›0m|›3mDown›0m|
  123.           +------------+                          +----+----+----+----+
  124.           +------------ ›3mInformation›0m ------------+                   +-+
  125.           |             Picture  Workbench      |     ›3mTile picture:›0m |V|
  126.           |                                     |                   +-+
  127.           |     Size:   96 x 96  640 x 256      |                   +-+
  128.           |                                     |  ›3mScreen picture:›0m  | |
  129.           |     Planes:   3         3           |                   +-+
  130.           |                                     |                   +-+
  131.           |     Aspect: 10 : 22  22 : 44        |    ›3mDelay loading:›0m | |
  132.           +-------------------------------------+                   +-+
  133.  
  134.   +------------+              +------------+                 +------------+
  135.   |›3m    Save    ›0m|              |›3m     Use    ›0m|                 |›3m   Cancel   ›0m|
  136.   +------------+              +------------+                 +------------+
  137.  
  138.  
  139. ›1mThe 'Name' gadget›0m
  140.  
  141. You enter the path to the picture here. The button ›3mbeside›0m opens a
  142. filerequester for doing the same job. The last part of the path appears in
  143. the ›3mlist of pictures›0m.
  144.  
  145.  
  146. ›1mThe 'Pattern' gadget›0m
  147.  
  148. Here you can enter the pattern, which is to use for this window. Windows,
  149. whose titles match the pattern will use this picture as their background
  150. pattern.
  151. Examples:
  152.  
  153.    "#? full, #? free, #? in use" - matches all discs
  154.    (3D|DPAINT|XiPaint)           - matches the drawers 3D, DPaint and
  155.                                    XiPaint
  156.  
  157. Possible tokens:
  158.  
  159.         ?       Matches a single character.
  160.         #       Matches the following expression 0 or more times.
  161.         (ab|cd) Matches any one of the items separated by '|'.
  162.         ~       Negates the following expression.  It matches all strings
  163.                 that do not match the expression (aka ~(foo) matches all
  164.                 strings that are not exactly "foo").
  165.         [abc]   Character class: matches any of the characters in the class.
  166.         [~bc]   Character class: matches any of the characters not in the
  167.                 class.
  168.         a-z     Character range (only within character classes).
  169.         %       Matches 0 characters always (useful in "(foo|bar|%)").
  170.  
  171.  
  172. ›1mThe 'Task' gadget›0m
  173.  
  174. Here you can enter the task pattern, which is to use for this window. Tasks,
  175. whose names match the pattern will use this picture as a background pattern
  176. for their windows.
  177. Examples:
  178.  
  179.    WORKBENCH            - only matches the Workbench task
  180.    #?DeliTracker#?       - the famous DeliTracker
  181.  
  182. Note the two '#?'s surounding the pattern. They are quite usefull, since
  183. 'DeliTracker' may become 'dh0:Tools/DeliTracker' when started from CLI.
  184.  
  185. Possible tokens:
  186.  
  187.         ?       Matches a single character.
  188.         #       Matches the following expression 0 or more times.
  189.         (ab|cd) Matches any one of the items separated by '|'.
  190.         ~       Negates the following expression.  It matches all strings
  191.                 that do not match the expression (aka ~(foo) matches all
  192.                 strings that are not exactly "foo").
  193.         [abc]   Character class: matches any of the characters in the class.
  194.         [~bc]   Character class: matches any of the characters not in the
  195.                 class.
  196.         a-z     Character range (only within character classes).
  197.         %       Matches 0 characters always (useful in "(foo|bar|%)").
  198.  
  199.  
  200. ›1mThe TILE flag›0m
  201.  
  202. The gadget 'Tile Picture' sets or clears the Tile flag of the ›3mactive›0m
  203. picture. By setting this flag the picture will be tiled to cover the whole
  204. area. Otherwise the remaining areas would be cleared with color 0 (grey).
  205. For this flag to work well, the ›3medges of the picture must fit together›0m.
  206.  
  207.  
  208. ›1mThe Screen flag›0m
  209.  
  210. The gadget 'Screen Picture' sets or clears the screen flag of the ›3mactive›0m
  211. picture. If this flag is set, the picture can be used to fill the blank
  212. area on screens. The ›3mpattern›0m is used to tell which screen should use the
  213. picture. To match the Workbench screen you must use the following:
  214.  
  215.    Pattern: "Workbench Screen"
  216.       Task: "WORKBENCH"
  217.  ScreenPic: set
  218.  
  219.  
  220. ›1mDelay loading›0m
  221.  
  222. The gadget 'Delay loading' determines when the picture is loaded. If it is
  223. set, then the picture is loaded when it is used for the first time. If
  224. there is some memory needed later, this picture may be freed again to get
  225. unused memory free. If you plan to use many pictures, you should set this
  226. flags for those, that are rarely used. Background will need lots of time to
  227. load them at startup otherwise.
  228.  
  229.  
  230. ›1mThe floppy symbol›0m
  231.  
  232. This gadget will open a filerequester allowing you to select a picture. The
  233. path appears then in the ›3mstring gadget›0m beside and in the ›3mlist of pictures›0m.
  234.  
  235.  
  236. ›1mThe list of pictures›0m
  237.  
  238. In the right part of the  window all currently loaded pictures are shown in
  239. a listview. The active picture is shown below the list. ›3mPath›0m, ›3mwindow pattern›0m,
  240. ›3mtask pattern›0m and other ›3mproperties›0m can be change using the remaining gadgets.
  241.  
  242.  
  243. ›1mThe 'Add' gadget›0m
  244.  
  245. The Add gadget will create a new ›3mentry›0m for a picture. ›3mPath›0m and ›3mpattern›0m are
  246. taken from the corresponding stringgadgets. The ›3mtype›0m of the new picture is
  247. set to 'Normal', the ›3mTILE flag›0m is also set. The new picture is either added
  248. just after the ›3mactive picture›0m or at the end of the l›3mList of pictures›0m.
  249.  
  250.  
  251. ›1mThe 'Delete' gadget›0m
  252.  
  253. The Delete gadget removes the ›3mactive picture›0m from the ›3mlist of pictures›0m;
  254. however string gadgets remain untouched. So if you have by mistake deleted
  255. the wrong picture, regain it using the ›3mAdd›0m gadget beside.
  256.  
  257.  
  258. ›1mThe 'Up' gadget›0m
  259.  
  260. The Up gadget moves the ›3mactive picture›0m one position up.
  261. If two pictures match the same window the one later in the ›3mlist›0m will be
  262. used. So the picture with the '#?' pattern should be on top of the ›3mlist›0m.
  263.  
  264.  
  265. ›1mThe 'Down' gadget›0m
  266.  
  267. The Down gadget moves the ›3mactive picture›0m one position down.
  268. If two pictures match the same window the one later in the ›3mlist›0m will be
  269. used. So there should only pictures at the end of the list that do only
  270. match one window and especially no one with a '#?' ›3mpattern›0m.
  271.  
  272.  
  273. ›1mThe 'View' gadget›0m
  274.  
  275. Selecting View will open a window in which you can see the ›3mactive picture ›0m
  276. like you would see it in an workbench window. To make changes (e.g. the
  277. ›3mTILE flag›0m) take effect you will have to select the gadget again.
  278.  
  279.  
  280. ›1mThe 'Save' gadget›0m
  281.  
  282. Save quits the editor, loads the pictures and saves the list so it is be
  283. used after a reboot.
  284.  
  285.  
  286. ›1mThe 'Use' gadget›0m
  287.  
  288. Use quits the editor, loads the new pictures and saves the list until the
  289. next reboot.
  290.  
  291. ›1mThe 'Cancel' gadget›0m
  292.  
  293. Cancel quits the editor without saving the list.
  294.  
  295.  
  296. ›1mGiven informations›0m
  297.  
  298. In this field information about size, aspect ratio and depth of the picture
  299. and your workbench are given. Size shows you (surprise, surprise) the Size
  300. of the picture or the workbench in pixels. Pictures that are bigger than
  301. your workbench will never be shown entirely. The number of colors is
  302. computed as follows:
  303.    2^number of bitplanes
  304. So if you are using 3 bitplanes you can choose from eight colors. A picture
  305. using more colors than the workbench will probably look weird. Because of
  306. this you should always choose pictures having as many as or less colors
  307. than your workbench. The last value Aspect shows the ratio of height to
  308. width. Workbench and picture should have the same ratio; otherwise
  309. distortion will occur.
  310.  
  311. ›3mWhich pictures can be used?›0m
  312.  
  313. ›1mThe menus›0m
  314.  
  315. The menus are the same as the ones of the system preferences editors, so
  316. you can also look their functions up in your system manual, if you don't
  317. understand something.
  318.  
  319.    Project        Edit                 Picture             Settings
  320.     ›3mOpen ...›0m       ›3mReset To Defaults›0m    ›3mCompute Colors›0m       ›3mSave Icons?›0m
  321.     ›3mSave As ...›0m    ›3mLast Saved›0m           ›3mDither›0m               ›3mQuantization >>›0m
  322.     ›3mAbout ...›0m      ›3mRestore›0m              ›3mLock Colors ...›0m        ›3mMedian Cut›0m
  323.     ›3mQuit›0m                                ›3mChange Colors ...›0m      ›3mCustom›0m
  324.                                         ›3mLoad Colors ...›0m
  325.                                         ›3mSave Selected ...›0m
  326.  
  327.  
  328. ›1mProject/Open›0m
  329.  
  330. Loads a list of pictures from a file.
  331.  
  332.  
  333. ›1mProject/Save As›0m
  334.  
  335. Lets you save the current list of pictures into a file. A file requester
  336. opens up showing Sys:Prefs/Presets as the default destination. If ›3mSave ›0m
  337. ›3mIcons?›0m is selected then an icon will be created to. Other than the system
  338. editors you can't load the list by double clicking on the icon. Instead you
  339. will have to use ›3mProject/Open›0m to load the list.
  340.  
  341.  
  342. ›1mProject/About›0m
  343.  
  344. This menu item shows information about the program. (›3mVersion, address of›0m
  345. ›3mauthors, utilities...›0m)
  346.  
  347.  
  348. ›1mProject/Quit›0m
  349.  
  350. Quits the editor without saving the list of pictures. This option has the same
  351. effect as ›3mCancel›0m.
  352.  
  353.  
  354. ›1mEdit/Reset To Defaults›0m
  355.  
  356. Clears the list of pictures. That means the patterns defined in WBPATTERN
  357. will be used.
  358.  
  359.  
  360. ›1mEdit/LastSaved›0m
  361.  
  362. Loads the last settings that were saved using ›3mSave›0m.
  363.  
  364.  
  365. ›1m Restore›0m
  366.  
  367. Resets the settings to the ones preset at program startup.
  368.  
  369.  
  370. ›1mPicture/Compute Colors›0m
  371.  
  372. Trys to find colors that match for all pictures in the ›3mlist›0m. There are two
  373. different methods for doing this. ›3mMedian Cut›0m is a procedure apadted from
  374. Paul S. Heckbert. ›3mCustom›0m is something created by me. In contrast to ›3mMedian›0m
  375. ›3mCut›0m colors can be ›3mlocked›0m, so that they won't be changed.
  376. But I really don't know if it is very fast or good. If somebody knows
  377. something about such things, he may look at the ›3malgorithm›0m and send his
  378. opinion to ›3mme.›0m
  379.  
  380.  
  381. ›1m Algo›0m
  382.  
  383.    1. Step: All colors that are used in the pictures are counted
  384.    2. Step: the colors are sorted into the available color pots. If there
  385.             is no free one, the two, which are the most similar to each
  386.             other, are combined taking the new color into account.
  387.    3. Step: Finally the color for every pot is calculated by summing up all
  388.             color values calculating the average of them.
  389.  
  390. the first and the last step are ok, so here's the source for the second
  391. step:
  392.  
  393.          /* ColourCount contains the number of used colours */
  394.  
  395.       for( i = ColourCount ; i > 0 ; i--)
  396.       {
  397.  
  398.             /* Search for some free pot */
  399.  
  400.          NewPot = NULL;
  401.          for(j = NumColours ; j > 0 ; j--)
  402.          {
  403.                                          /* The pot is still empty
  404.                                           * (locked colors have a 1)
  405.                                           */
  406.             if (Pot[j] . NumPixels == 0)
  407.             {
  408.                NewPot = &Pot[j];
  409.                break;
  410.             }
  411.          }
  412.  
  413.          if(NewPot != NULL) /* we have found a free one */
  414.          {
  415.             /* sRed, sGreen, sBlue contained the summed up color values
  416.                Red, Green, Blue the real ones
  417.             */
  418.  
  419.             pix = NewPot -> NumPixels = ColourTable[i-1] . NumPixels;
  420.             NewPot -> sRed   = (NewPot -> Red   = ColourTable[i-1] . Red  )*pix;
  421.             NewPot -> sGreen = (NewPot -> Green = ColourTable[i-1] . Green)*pix;
  422.             NewPot -> sBlue  = (NewPot -> Blue  = ColourTable[i-1] . Blue )*pix;
  423.          }
  424.          else
  425.          {
  426.  
  427.             /* Now we have to combine two pots */
  428.  
  429.             pix = Pot[0] . NumPixels = ColourTable[i] . NumPixels;
  430.             Pot[0] . sRed   = (Pot[0] . Red   = ColourTable[i-1] . Red  )*pix;
  431.             Pot[0] . sGreen = (Pot[0] . Green = ColourTable[i-1] . Green)*pix;
  432.             Pot[0] . sBlue  = (Pot[0] . Blue  = ColourTable[i-1] . Blue )*pix;
  433.  
  434.             Dist = 0x7fffffff; /* Largest distance between two colors */
  435.             for(j = NumColours ; j > 0 && Dist; j--)
  436.             {
  437.                for(k = j - 1 ; k >= 0 && Dist ; k--)
  438.                {
  439.                   DistRGB = Pot[k] . Red - Pot[j] . Red;
  440.                   NewDist = DistRGB * DistRGB;
  441.  
  442.                   DistRGB = Pot[k] . Green - Pot[j] . Green;
  443.                   NewDist += DistRGB * DistRGB;
  444.  
  445.                   DistRGB = Pot[k] . Blue - Pot[j] . Blue;
  446.                   NewDist += DistRGB * DistRGB;
  447.  
  448.                   /* If the new color is nearer than the old one, and at
  449.                      least one is not locked
  450.                   */
  451.  
  452.                   if ((NewDist <= Dist) && !(Pot[k] . Locked && Pot[j] . Locked))
  453.                   {
  454.                      NewPot  = &Pot[j];
  455.                      NewPot2 = &Pot[k];
  456.                      Dist = NewDist;
  457.                   }
  458.                }
  459.             }
  460.  
  461.             /* Combine the two */
  462.  
  463.             if (!((NewPot -> Locked) || (NewPot2 -> Locked)))
  464.             {
  465.                pix = (NewPot -> NumPixels  += NewPot2 -> NumPixels);
  466.                NewPot -> Red   = ((NewPot -> sRed   += NewPot2 -> sRed)/pix);
  467.                NewPot -> Green = ((NewPot -> sGreen += NewPot2 -> sGreen)/pix);
  468.                NewPot -> Blue  = ((NewPot -> sBlue  += NewPot2 -> sBlue)/pix);
  469.             }
  470.             else if (NewPot2 -> Locked)
  471.             {
  472.                NewPot -> Red   = NewPot2 -> Red;
  473.                NewPot -> Green = NewPot2 -> Green;
  474.                NewPot -> Blue  = NewPot2 -> Blue;
  475.             }
  476.  
  477.             /* Really insert the new color */
  478.  
  479.             *NewPot2 = Pot[0];
  480.          } /* else */
  481.  
  482.       } /* for i */
  483.  
  484.  
  485. ›1mPicture/Dither›0m
  486.  
  487. Color adapts the ›3mactive picture›0m to the current colors. The Floyd-Steinberg
  488. algorithm is used for this.
  489.  
  490.  
  491. ›1mPicture/Lock Colors›0m
  492.  
  493. A window appears in which colors can be locked. Locked colors are not
  494. changed during ›3mCompute Colors›0m. Only the ›3mcustom›0m method supports this, ›3mMedian›0m
  495. ›3mCut›0m does not care about locked colors.
  496.  
  497.  
  498. ›1mPicture/Change Colors›0m
  499.  
  500. A color requester appears in which the current colors can be changed.
  501.  
  502.  
  503. ›1mPicture/Load Colors›0m
  504.  
  505. Using this menu item you can load colors from any IFF file. So if you want
  506. to ›3madapt›0m your pictures to Workbench's colors, load the file
  507. 'ENV:Sys/Palette.ilbm' and call ›3mDither›0m for every picture that will be shown
  508. on Workbench. To use colors from another screen, you will have to make a
  509. screenshot of it and then load this file.
  510.  
  511.  
  512. ›1mPicture/Save Selected›0m
  513.  
  514. This menu item allows you to save the ›3mactive picture›0m to disk. A
  515. filerequester appears in which you can choose where it should be written to.
  516.  
  517.  
  518. ›1mSettings/SaveIcons?›0m
  519.  
  520. Using this option you can save icons along with settings saved by ›3mSave As›0m.
  521. However these settings cannot be activated by double clicking on the icon.
  522. Instead you must use ›3mProject/Open›0m.
  523.  
  524.  
  525. ›1m Median›0m
  526.  
  527. If this menu item is selected the Median Cut method is used for ›3mcolor›0m
  528. ›3madaption›0m. This method does not support ›3mlocked colors.›0m
  529.  
  530.  
  531. ›1m Custom›0m
  532.  
  533. If this menu item is selected my custom method is used for ›3mcolor adaption.›0m
  534. It does support ›3mlocked colors›0m, but I don't know if it's fast or good.
  535.  
  536.  
  537.   backprefs.guide.english converted by
  538.   Guide2Doc 1.0 (02-Nov-1993) FreeWare - © Koessi
  539.