Pregunta

CS5 le permite guardar el proyecto FLA como un montón de archivos XML que codifican los gráficos vectoriales en algún formato, como:

<Edge cubics="!8809 4331(;8821,4327 8849,4316 8865,4311q8809 4331 8865 4311);" /> 

¿Hay alguna parte de una especificación de formato de explicar lo que significan esas entradas?

¿Fue útil?

Solución

No todavía. Adobe ha dicho que tienen la intención de liberar una especificación, pero no parece haber sucedido todavía.

Por desgracia, tampoco creo que se le conoce actualmente lo que significan esos números (a menos que la figura hacia fuera!). Pero puedo hacer una conjetura que los mismos números son probablemente en twips (que en la jerga de flash son veinteavos de un píxel, no de un punto como en la tipografía), por lo que si todos ellos divide por veinte es probable que tenga píxeles desplazamientos medidos desde la esquina superior izquierda de ... algo. ;) ¿Qué puede ser suficiente para que pueda descifrar lo que los medios de línea.

Pero en este momento, lo mejor que podemos hacer es interpretar una determinada pieza de XFL; no hay manera de saber por completo de qué manera es o no es legal para cambiarlo.

Otros consejos

I don't know exact meaning yet, but it looks that this is additional info for the Flash API about the shape. This info is not needed and you can delete this lines and still load the XFL without problems. The cubics data will be added again when you try to edit the shape again. It's just something like a cache info.

You can see it here:

<Edge fillStyle1="1" strokeStyle="1" edges="!2720 2720|0 2720!0 2720|0 0!0 0/2720 2720"/>
<Edge cubics="!0 2720(;0,2720 0,0 0,0q0 2720 0 0);"/>
<Edge cubics="!2720 2720(;2720,2720 0,2720 0,2720q2720 2720 0 2720);"/>
<Edge cubics="!0 0(;0,0 2720,2720 2720,2720q0 0 2720 2720);"/>

This is triangle consisting with 3 lines and the related additional cubics info.

Also note that the edges data is unnecessarily verbose. The same shape could be described like:

    ChangeStyle:
        Move: [2720 2720]
        FillStyle1: 1
        LineStyle: 1
    Line: -2720 0 0 -2720 2720 2720 

This one is for two lines, one horizontal and one vertical:

<Edge strokeStyle="1" edges="!2640 3020|2640 5240!1520 1740|4879 1740"/>
<Edge cubics="!1520 1740(;1520,1740 4879,1740 4879,1740q1520 1740 4879 1740);"/>

The data does not change with each shape change so it must be just some internal helpful stuff. I recommend to remove these lines if you want to build/modify the shape data with some external tool (as I want to do).

Fenomas is right that the numbers are in twips so if you want pixel values, you must divide them by 20.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top