The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CAD::Drawing::Defined -- exported constants for CAD::Drawing::*

Description

Everything in this module is exported by default. This module is not intended to be used directly, but is required by each module in the CAD::Drawing tree.

AUTHOR

  Eric L. Wilhelm
  ewilhelm at sbcglobal dot net
  http://pages.sbcglobal.net/mycroft

COPYRIGHT

This module is copyright (C) 2003 by Eric L. Wilhelm and A. Zahner Co.

LICENSE

This module is distributed under the same terms as Perl. See the Perl source package for details.

You may use this software under one of the following licenses:

  (1) GNU General Public License
    (found at http://www.gnu.org/copyleft/gpl.html)
  (2) Artistic License
    (found at http://www.perl.com/pub/language/misc/Artistic.html)

NO WARRANTY

This software is distributed with ABSOLUTELY NO WARRANTY. The author and his employer will in no way be held liable for any loss or damages resulting from its use.

Modifications

The source code of this module is made freely available and distributable under the GPL or Artistic License. Modifications to and use of this software must adhere to one of these licenses. Changes to the code should be noted as such and this notification (as well as the above copyright information) must remain intact on all copies of the code.

Additionally, while the author is actively developing this code, notification of any intended changes or extensions would be most helpful in avoiding repeated work for all parties involved. Please contact the author with any such development plans.

Useful Functions

These were functions that didn't seem appropriate as object-oriented but were needed in multiple places. They are exported by default (as is nearly everything in this package.

check_select

Provides a uniform interface to selection processing.

NOTE: this is not an object method and is exported by default!

Internal use only.

%opts hash may contain

  Inclusive lists:
  "select layers" 
  "select colors"
  "select types" 

  Exclusive lists:
  "not layers"
  "not colors"
  "not types"

The values must be list references.

If an option is omitted, all of that category are selected.

  ($s, $n) = check_select(\%selection_options);

$s will be a hash reference to inclusive items $n will be a hash reference to excluded items.

checkarcangs

Performs in-place modification of arc angles in \@angs.

NOTE: this is not an object method and is exported by default!

Internal use only.

  checkarcangs(\@angs);

color_translate

Translates a list of colors into numbers. Numbers will be passed through (as will unrecognized names!)

  @colors = color_translate(@colors);

Various definitions

%color_names

useful for humans

%call_syntax

used to allow other functions to decide how to handle various entities

Big Constant arrays

@aci2hex

256 value array which contains #RRGGBB photo-style hex codes for each aci color

@aci2rgb

Generated from @aci2hex for use in postscript and other items. The idea here is that it is a fairly small set of values and may as well have been generated and placed in this file, rather than constantly loading-down the tight loop of saving values to postscript.

regen_aci2rgb

Fairly self-explanatory. Saved here only so I don't lose it.