Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 846895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:41:29+00:00 2026-05-15T06:41:29+00:00

I want to use this function to get contours and within these contours, I

  • 0

I want to use this function to get contours and within these contours, I want to get cubic bezier. I think I have to call it with GGO_BEZIER. What puzzles me is how the return buffer works.

“A glyph outline is returned as a
series of one or more contours defined
by a TTPOLYGONHEADER structure
followed by one or more curves. Each
curve in the contour is defined by a
TTPOLYCURVE structure followed by a
number of POINTFX data points. POINTFX
points are absolute positions, not
relative moves. The starting point of
a contour is given by the pfxStart
member of the TTPOLYGONHEADER
structure. The starting point of each
curve is the last point of the
previous curve or the starting point
of the contour. The count of data
points in a curve is stored in the
cpfx member of TTPOLYCURVE structure.
The size of each contour in the
buffer, in bytes, is stored in the cb
member of TTPOLYGONHEADER structure.
Additional curve definitions are
packed into the buffer following
preceding curves and additional
contours are packed into the buffer
following preceding contours. The
buffer contains as many contours as
fit within the buffer returned by
GetGlyphOutline.”

I’m really not sure how to access the contours. I know that I can change a pointer another type of pointer but i’m not sure how I go about getting the contours based on this documentation.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:41:30+00:00Added an answer on May 15, 2026 at 6:41 am

    I have never used this API myself, but after reading the MSDN documentation I would think it works like this:

    First you have to call GetGlyphOutline with the lpvBuffer parameter set to NULL. Then the function will return the required size of the buffer. You’ll then have to allocate a buffer with that size, then call the function again with lpvBuffer set to your newly created buffer.
    If you take a look at the documentation for TTPOLYGONHEADER it says:

    Each TTPOLYGONHEADER structure is followed by one or more TTPOLYCURVE structures.

    So, basically you have to do something like this:

    BYTE*              pMyBuffer   = NULL;
    ...
    TTPOLYGONHEADER*    pPolyHdr    = reinterpret_cast<TTPOLYGONHEADER*>(pMyBuffer);
    TTPOLYCURVE*        pPolyCurve  = reinterpret_cast<TTPOLYCURVE*>(pMyBuffer + sizeof(TTPOLYGONHEADER));
    

    Then, check the pPolyCurve->cpfx member which contains the number of POINTFX structures.
    Then you can iterate all the points by doing something like this:

    for (WORD i = 0; i < pPolyCurve->cpfx: ++i)
    {
        pCurve->apfx[i].x;
        pCurve->apfx[i].y;
    }
    

    Since the TTPOLYGONHEADER doesn’t tell you how many TTPOLYCURVE structures are in the buffer, I guess you’ll have to keep track of that yourself by subtracting the size of the individual structures from the size of your buffer and keep going until you reach 0.

    Please excuse any potential errors as I didn’t test this myself 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an AS3 class with some getVideo function. I want to use this
I want to use this function EnumWindows(EnumWindowsProc, NULL);. The EnumWindowsProc is a Callback function:
I want to use this function: http://www.frankmacdonald.co.uk/php/post-to-wordpress-with-php.html Its used to post to Wordpress using
I have a string in XML format and I want to use this string
When I want to get the title of a remote webiste, I use this
I want to get the CPU cycles at a specific point. I use this
I want to use min(5,10) , or Math.max(4,7) . Are there functions to this
I want to use this pure HTML/CSS template for my ASP.NET website: http://sub3.tanguay.de I
I want to use this for an object factory: Given a string, create a
I want to use this C code in my C++ project : mysql.c :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.