Hlavní navigace

Vlákno názorů k článku PostScript: vyplňované cesty, transformace a natočený text od Kaminar - Proč mi nelícuje "0" s "1" v mém...

  • Článek je starý, nové názory již nelze přidávat.
  • 31. 5. 2007 11:41

    Kaminar
    Proč mi nelícuje "0" s "1" v mém příkladu?

    /Helvetica findfont
    72 scalefont
    setfont

    200 0 moveto
    (0) show

    100 0 translate
    0 0 transform
    moveto
    (1) show

    showpage
  • 31. 5. 2007 12:49

    Pavel Tišnovský
    On se ještě provádí převod z uživatelského souřadného systému do systému zařízení. Taky mě to zmátlo, protože po

    100 0 transform

    byla na zásobníku hodnota 5555.55 0

    Což odpovídá cca 55 DPI, v tomto případě tuto hodnotu GhostScript získal z nastavení X-ek.

    Takže ta jednička je "ulítlá" někde napravo mimo papír.
  • 31. 5. 2007 12:57

    tyglik (neregistrovaný)
    _transform_
    x y transform x y
    x y matrix transform x y
    applies a transformation matrix to the coordinates (x, y), returning the transformed
    coordinates (x, y). The first form of the operator uses the current transformation
    matrix in the graphics state to transform user space coordinates to
    device space. The second form applies the transformation specified by the matrix
    operand rather than the CTM.
    Errors: rangecheck, stackunderflow, typecheck
    See Also: itransform, dtransform, idtransform
    
    _translate_
    tx ty translate –
    tx ty matrix translate matrix
    moves the origin of the user coordinate space by tx units horizontally and ty units
    vertically, or returns a matrix representing this transformation. The orientation of
    the axes and the sizes of the coordinate units are unaffected.
    The transformation is represented by the matrix
    The first form of the operator applies this transformation to the user coordinate
    system by concatenating matrix T with the current transformation matrix (CTM);
    that is, it replaces the CTM with the matrix product T  CTM. The second form
    replaces the value of the matrix operand with an array representing matrix T and
    pushes the result back on the operand stack without altering the CTM. See
    Section 4.3.3, “Matrix Representation and Manipulation,” for a discussion of how
    matrices are represented as arrays.
    Errors: rangecheck, stackunderflow, typecheck
    See Also: setmatrix, currentmatrix, scale, rotate, concat