????? ????? ???? GetGlyphOutline() ??????

?????? ????????? ?????? ?????????
???? ???????: 87115 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

????? ?????? GetGlyphOutline ????? ???? ????????? ??????? ??????? ??? ??????? ?????? ??? ?????? ??????? ?? ???? ???????. ???? ??? ??????? ????? ???????? ?????? GetGlyphOutline.

??????? ????

???? ?????? ?????? ??????? ????? ?? ????? ?? ???? ?????? ????? ???? ??? ?????? ???????. ??? ????? ?? ???? ??????? ?????? ???? ?????? TTPOLYGONHEADER ???? ??????? ?????? ?? TTPOLYCURVE ????? ???????? ??? ?? ?????? ???? ????????.

??? ??? ??? ???? ?????? ???? ?????? POINTFX ???? ???? ???? ??? ???? ???? ??. ??? ????? ??????? ???????? ???? ?????? ??????? ??? ??? pfxStart ???? ?????? TTPOLYGONHEADER.

????? ????? ???????? TTPOLYCURVE ??? ?????: ??? TT_PRIM_LINE ?? ??? TT_PRIM_QSPLINE. ??? TT_PRIM_LINE ????? ?? ??????; ???? ?????? ??????? ??? ?????? ???????? ??? ??????. ??? TT_PRIM_QSPLINE ????? ?? ????? ?? ?????? ????? splines quadratic (q splines) ???????? ???? ?????? ???????? ?????.

?? "???????" ? ??? ????? ????? q ?????? ???? ???? (A ? B ? C) ? ??? ???? ???? ? C ??????? ????? B ????? ???????. ?????? ?? ????? q ??? ??? (xA ???? ???????? ? ???? a yA ???? ???????? ? A ???? ?????)
   x(t) = (xA-2xB+xC)*t^2 + (2xB-2xA)*t + xA
   y(t) = (yA-2yB+yC)*t^2 + (2yB-2yA)*t + yA
				
??? ????? t ?? 0.0 ??? 1.0.

????? ????? TT_PRIM_QSPLINE ??? ???:
  • ?????? ? ?? ??????? q ?? ?????? ?????? (pfxStart ??? ?? TTPOLYGONHEADER ?? ???? ??????? TTPOLYCURVE ???? ??????? TTPOLYCURVE ??????).
  • ???? B ?? ???? ?????? ?? ?????.
  • ???? C ??? ???:
    • ??? ??? ??? ????? ????? ?? ???? ?? ?????? ??????? B ???? ???? C ?? ???? ????? ??? B ???? ????? ?????? ?? ?????.
    • ????? ???? C ?? ???? ??????? ???? B.
???? ???????? ???????? ??????? ?????????? ????????? ??????? ??? TT_PRIM_QSPLINE. ????? ??? ???????? ???????? ???? ????? ??????? q splines ?? ??? TT_PRIM_QSPLINE ? ??? ?????? ????????? ?? ????? ??.
   pfxA = pfxStart;                // Starting point for this polygon

   for (u = 0; u < cpfx - 1; u++)  // Walk through points in spline

   {
   pfxB = apfx[u];              // B is always the current point
   if (u < cpfx - 2)            // If not on last spline, compute C

      {
      pfxC.x = (pfxB.x + apfx[u+1].x) / 2;  // x midpoint
      pfxC.y = (pfxB.y + apfx[u+1].y) / 2;  // y midpoint
      }

   else                         // Else, next point is C

      pfxC = apfx[u+1];


                                // Draw q-spline
   DrawQSpline(hdc, pfxA, pfxB, pfxC);
   pfxA = pfxC;                 // Update current point
   }
				
???????? ????? ????? ???? ???????? ???????? ????? ??????? ??????? ???????. ??? ???? ??? ????? ???? ?? ??????? q ??????? ?? ??? ?????? FIXED. ???? ???????? ???????? ?????? ????? ?????? ????? ???????? FIXED:
   FIXED fx;
   long *pl = (long *)&fx;

   // Perform all arithmetic on *pl rather than on fx

   *pl = *pl / 2;
				
????? ?????? ??????? ??? ??????? ????? ?? ????? FIXED:
   FIXED FixedFromDouble(double d)
   {

   long l;

   l = (long) (d * 65536L);
   return *(FIXED *)&amp;l;

   }
				
?? ????? ????? ????? ?? ????? ???? DrawQSpline ???? ?? ????? q ???? ?????, ???? ???? ???? ????? ???? ??? ??????? q ???????? ?? ???? ????? ?????? ????. ??? ?????? ???????? ?????? ??????? ????? ???? ???? ?????? PolyPolygon ???? ?? ????? ??? ?????? ???????.

???? ?????? ?????? ???????? ???? ?? ??????? ?????? GetGlyphOutline ?????? ??????? ??????? "j" ?? ???? Arial 24 ???? ??????? 8514/a (???? ?????) ???????:
   GetGlyphOutline GGO_NATIVE 'j'
   dwrc            = 208      // Total native buffer size in bytes
   gmBlackBoxX, Y  = 6, 29    // Dimensions of black part of glyph
   gmptGlyphOrigin = -1, 23   // Lower-left corner of glyph
   gmCellIncX, Y   = 7, 0     // Vector to next glyph origin

   TTPOLYGONHEADER #1           // Contour for dot on "j"
   cb       = 44              // Total size of dot polygon
   dwType   = 24              // TT_POLYGON_TYPE
   pfxStart = 2.000, 20.000   // Start at lower-left corner of dot

   TTPOLYCURVE #1

   wType  = TT_PRIM_LINE
   cpfx   = 3
   pfx[0] = 2.000, 23.000
   pfx[1] = 5.000, 23.000
   pfx[2] = 5.000, 20.000   // Automatically close to pfxStart

   TTPOLYGONHEADER #2   // Contour for body of "j"
   cb       = 164     // Total size is 164 bytes
   dwType   = 24      // TT_POLYGON_TYPE
   pfxStart = -1.469, -5.641

   TTPOLYCURVE #1     // Finish flat bottom end of "j"

   wType  = TT_PRIM_LINE
   cpfx   = 1
   pfx[0] = -0.828, -2.813

   TTPOLYCURVE #2    // Make hook in "j" with spline

                    // Point A in spline is end of TTPOLYCURVE #1
    wType  = TT_PRIM_QSPLINE
    cpfx   = 2               // two points in spline -> one curve
    pfx[0] = -0.047, -3.000  // This is point B in spline
    pfx[1] = 0.406, -3.000   // Last point is always point C

   TTPOLYCURVE #3    // Finish hook in "j"

                    // Point A in spline is end of TTPOLYCURVE #2
   wType  = TT_PRIM_QSPLINE
   cpfx   = 3               // Three points -> two splines
   pfx[0] = 1.219, -3.000   // Point B for first spline
                             // Point C is (pfx[0] + pfx[1]) / 2
   pfx[1] = 2.000, -1.906   // Point B for second spline
   pfx[2] = 2.000, 0.281    // Point C for second spline

   TTPOLYCURVE #4    // Majority of "j" outlined by this polyline

    wType  = TT_PRIM_LINE
    cpfx   = 3
    pfx[0] = 2.000, 17.000
    pfx[1] = 5.000, 17.000
    pfx[2] = 5.000, -0.250

   TTPOLYCURVE #5    // start of bottom of hook

    wType  = TT_PRIM_QSPLINE
    cpfx   = 2               // One spline in this polycurve
    pfx[0] = 5.000, -3.266   // Point B for spline
    pfx[1] = 4.188, -4.453   // Point C for spline

   TTPOLYCURVE #6    // Middle of bottom of hook

    wType  = TT_PRIM_QSPLINE
    cpfx   = 2               // One spline in this polycurve
    pfx[0] = 3.156, -6.000   // B for spline
    pfx[1] = 0.766, -6.000   // C for spline

   TTPOLYCURVE #7    // Finish bottom of hook and glyph

    wType  = TT_PRIM_QSPLINE
    cpfx   = 2               // One spline in this polycurve
    pfx[0] = -0.391, -6.000  // B for spline
    pfx[1] = -1.469, -5.641  // C for spline
				

???????

???? ???????: 87115 - ????? ??? ??????: 30/????/1427 - ??????: 2.3
????? ???
  • Microsoft Windows Software Development Kit 3.1
  • Microsoft Win32 ????? ????? ???????
????? ??????: 
kbmt kbhowto KB87115 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????87115
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com