incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jianyuan Li <lijianyuan1...@gmail.com>
Subject Re: Understanding custom shapes
Date Mon, 06 Aug 2012 02:44:14 GMT
Hi, Regina,

Below is my understanding for custom shape segment.
An segment is consist of two parts: command and count. It is described with
an integer with two bytes. The high byte describes command and the low byte
describes count. For the high byte, the high 3 bits is used to show the
basic command and the low 5 bits is used to show extended command. See my
attachment for details.
Taking "0x4000" as an example, it means command is moveto and count is 0.
Moveto is shown with "2" and occupy the first 3 bits of high byte. So 0x40
will be calculated.

2012/8/6 Regina Henschel <rb.henschel@t-online.de>

> Hi all,
>
> I'm currently learning, how custom shapes work. I know already, how to
> write them directly in the XML file format, I understand what I see in
> Basic, I understand mso_sptxxxVer[], mso_sptxxxCalc[], and
> mso_sptxxxGluePoints[].
>
> But now I stuck with mso_sptxxxSegm[]. I understand the "Segments" as they
> are shown in Basic, but I cannot map that to mso_sptxxxSegm[].
>
> For example for custom shape "Parallelogram" I see in Basic:
> Command Count Command Count Command Count Command Count
>    1      1      2      3      4      0      5     0
> which is
> M L L L Z N
>
> In mso_sptParallelogramSegm[] I read
>    0x4000, 0x0003, 0x6001, 0x8000
> and have no idea, how that fits together.
>
> Can someone give me a pointer or explain it to me?
>
> Kind regards
> Regina
>

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message