Differences between revisions 2 and 3
Revision 2 as of 2006-02-19 09:34:57
Size: 666
Editor: TFKyle
Comment:
Revision 3 as of 2006-02-19 09:52:27
Size: 1870
Editor: TFKyle
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

'''Note''': the formats described on this page are highly subject to change, see /ScratchPad for random ideas that are floating around
Line 13: Line 15:
<ChangeSet author="Kyle"> <ChangeSet author="Kyle" rev="10">
Line 19: Line 21:

Pretty straight Forward, but I'll explain it too:

==== ChangeSet Element ====

a '''ChangeSet''' Element represents a set of changes (duh), it contains any number of '''Change''' Elements, as well as '''author''' and '''rev''' Attributes, which are explained below (Off-Topic Note: typically in the protocol the client will send a single ChangeSet element which contains the changes since it last synced with the server)

'''Attributes''':

 * '''author''': the Author of the changes in the changeset, can be any UTF-8 string
 * '''rev''': the Revision of said change, currently how this is used is undefined

==== Change Element ====

a '''Change''' Element represents a change, currently this element is highly subject to change since I havn't thought about this yet, but heres the explaination of the current attributes:

 * '''width''', '''height''': the width and height a change covers, yes a change must be rectangular
 * '''hpos''', '''vpos''': the horizontal and vertical position of the start of the change, starts at 1,1 in the upper-left corner

FOCanvas File Format

Note: the formats described on this page are highly subject to change, see /ScratchPad for random ideas that are floating around

FOCanvas will Internally Use 2 Objects, an XCF of the current state, and an XML Form of all the changes, that format will be described in the following Section

XML ChangeSet Format

Note: This is what we will use in the ["../Protocol"] to send changes.

The format allows you to recreate the drawing from a blank canvas, it consists of Many ChangeSets. lets start with an example of a ChangeSet since those are always effective at giving an overview:

<ChangeSet author="Kyle" rev="10">
    <Change width="100" height="40" hpos="90" vpos="1">(base-64 encoded pixel data)</Change>
    <Change ...>...</Change>
    ...
</ChangeSet>

Pretty straight Forward, but I'll explain it too:

ChangeSet Element

a ChangeSet Element represents a set of changes (duh), it contains any number of Change Elements, as well as author and rev Attributes, which are explained below (Off-Topic Note: typically in the protocol the client will send a single ChangeSet element which contains the changes since it last synced with the server)

Attributes:

  • author: the Author of the changes in the changeset, can be any UTF-8 string

  • rev: the Revision of said change, currently how this is used is undefined

Change Element

a Change Element represents a change, currently this element is highly subject to change since I havn't thought about this yet, but heres the explaination of the current attributes:

  • width, height: the width and height a change covers, yes a change must be rectangular

  • hpos, vpos: the horizontal and vertical position of the start of the change, starts at 1,1 in the upper-left corner

FOCanvas/FileFormat (last edited 2008-02-05 05:46:33 by localhost)