|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T g
Length: 2474 (0x9aa) Types: TextFile Names: »gsmatrix.h«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z« └─⟦a24a58cd3⟧ └─⟦this⟧ »gsmatrix.h«
/* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. Ghostscript is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the Ghostscript General Public License for full details. Everyone is granted permission to copy, modify and redistribute Ghostscript, but only under the conditions described in the Ghostscript General Public License. A copy of this license is supposed to have been given to you along with Ghostscript so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. */ /* gsmatrix.h */ /* Definition of matrices and matrix routines for GhostScript library */ /* See p. 65 of the PostScript manual for the semantics of */ /* transformation matrices. */ /* Structure for a transformation matrix. */ /* This is a machine-dependent hack to avoid importing */ /* the full definition of a GhostScript type-tagged reference. */ #define _matrix_body\ float xx; long _xx /*skip*/;\ float xy; long _xy /*skip*/;\ float yx; long _yx /*skip*/;\ float yy; long _yy /*skip*/;\ float tx; long _tx /*skip*/;\ float ty; long _ty /*skip*/ typedef struct gs_matrix_s { _matrix_body; } gs_matrix; /* The identity matrix (for structure initialization) */ #define identity_matrix_body\ 1.0,0, 0.0,0, 0.0,0, 1.0,0, 0.0,0, 0.0,0 /* Matrix creation */ void gs_make_identity(P1(gs_matrix *)); int gs_make_translation(P3(floatp, floatp, gs_matrix *)), gs_make_scaling(P3(floatp, floatp, gs_matrix *)), gs_make_rotation(P2(floatp, gs_matrix *)); /* Matrix arithmetic */ int gs_matrix_multiply(P3(gs_matrix *, gs_matrix *, gs_matrix *)), gs_matrix_invert(P2(gs_matrix *, gs_matrix *)), gs_matrix_rotate(P3(gs_matrix *, floatp, gs_matrix *)); /* Coordinate transformation */ int gs_point_transform(P4(floatp, floatp, gs_matrix *, gs_point *)), gs_point_transform_inverse(P4(floatp, floatp, gs_matrix *, gs_point *)), gs_distance_transform(P4(floatp, floatp, gs_matrix *, gs_point *)), gs_distance_transform_inverse(P4(floatp, floatp, gs_matrix *, gs_point *)), gs_bbox_transform_inverse(P3(float [4], gs_matrix *, float [4]));