locked
[MS-EMF] Query on EMF EmrText structure (Reference) RRS feed

  • Question

  • G'day,

    MS-EMF Section 2.2.4 describes the EmrText structure. See
    http://msdn.microsoft.com/en-us/library/cc204228.aspx

    It says:
    Reference (8 bytes): A 64-bit windows metafile format (WMF) PointL object ([MS-WMF] section 2.2.1.11), which specifies the coordinates of the reference point used to position the string.

    I am OK with this being a "reference point", but am not sure how the text is supposed to be placed relative to this point.

    Questions:
    1. How does this point relate to the baseline of the text string?

    2. How does this relationship vary with each of the possible boolean values in the "Options" field of this structure (which is ExtTextOutOptions enum)? I'm particularly concerned about ETO_RTLREADING and ETO_PDY - the others don't look like they should affect anything.

    Brad
    Saturday, October 4, 2008 4:11 AM

Answers

  •  

    Hi Brad,

     

    Some clarifications will be made in section 2.2.5 (EmrText Object is no longer on section 2.2.4 in newer revisions):

     

    In the specification of the Reference field, we will  indicate that the reference point is defined by the last EMR_SETTEXTALIGN record. If no such record has been seen, the default alignment is TA_LEFT|TA_TOP.

     

    In the specification of the DxBuffer field, OutputDx sub-field, we will indicate that if the Options field of the EmrText object contains the ETO_PDY flag then this buffer contains twice as many values as there are characters in the output string, one horizontal and one vertical offset for each, in that order. Also, if ETO_RTLREADING is specified then, indeed, characters are laid right to left instead of left to right. No other options affect the interpretation of this field.

     

    The final wording is still not defined, but I wanted to make sure that you had the info available as soon as it was confirmed.

     

    Thanks!


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Marked as answer by Brad Hards Friday, October 17, 2008 11:26 PM
    Friday, October 17, 2008 6:12 PM

All replies

  •  Hi Brad, thanks for your post regarding the [MS-EMF] protocol specification. We will review your question and update the forum once our investigation is complete.

    Thanks!
    John Dunning
    Escalation Engineer Microsoft Corporation
    US-CSS DSC PROTOCOL TEAM

    Saturday, October 4, 2008 1:36 PM
  • I've got this partly solved - the relationship between the reference point and the text position relative to the text baseline or bounding rectangle  is explained in relation to the EMR_SETTEXTALIGN record type, and the TextAlignMode flags (which are in MS-WMF, section 2.1.2.3).

    I'd still be interested in any clarification on the effect that the Options field has.

    Brad
    Monday, October 6, 2008 5:43 AM
  •  

    Hi Brad,

     

    Some clarifications will be made in section 2.2.5 (EmrText Object is no longer on section 2.2.4 in newer revisions):

     

    In the specification of the Reference field, we will  indicate that the reference point is defined by the last EMR_SETTEXTALIGN record. If no such record has been seen, the default alignment is TA_LEFT|TA_TOP.

     

    In the specification of the DxBuffer field, OutputDx sub-field, we will indicate that if the Options field of the EmrText object contains the ETO_PDY flag then this buffer contains twice as many values as there are characters in the output string, one horizontal and one vertical offset for each, in that order. Also, if ETO_RTLREADING is specified then, indeed, characters are laid right to left instead of left to right. No other options affect the interpretation of this field.

     

    The final wording is still not defined, but I wanted to make sure that you had the info available as soon as it was confirmed.

     

    Thanks!


    SEBASTIAN CANEVARI - MSFT SEE Protocol Documentation Team
    • Marked as answer by Brad Hards Friday, October 17, 2008 11:26 PM
    Friday, October 17, 2008 6:12 PM
  • Sebastian,

    Thanks for this. Looks like it fully answers my query.

    Brad
    Friday, October 17, 2008 11:27 PM