FROM : Graham Cox
DATE : Thu May 08 03:06:17 2008
I don't think it makes the more classic approach wrong - it's just
another way to crack that particular nut, with its own advantages (and
probably disadvantages too, like more code, more dependency between
classes, possibly lower performance, I don't know - but there's no
"one true way" to do it).
But either way, grouping is an exercise in concatenating transforms,
basically.
I'm intrigued by your allusions to shadow drawing, I've had a lot of
problems with that too - it's a performance killer.
Regarding flowing text around objects, do you have a function for
breaking an arbitrary shape into a series of line rectangles that
you'd be prepared to share with the world?
G.
On 8 May 2008, at 3:31 am, Gordon Apple wrote:
> This is a major advantage of separating the drawing (rendering)
> code
> from the data model instead of having objects draw themselves (not to
> mention cross-platform). Our renderer object is recursive (and
> could be a
> shared object if not for the deficiencies in shadow rendering -- a
> story for
> another time). When we replace objects with a group object, all the
> transforms automatically work. Grouping can be nested to any
> level. Since
> we only have one "Shape" type, groups can also take on object
> characteristics such as fills, content, text, etc. This especially
> works
> well for using group objects for sophisticated text containers where
> text
> flows around contained objects.
>
> I know that about every example of drawing has subclassed objects
> that
> draw themselves. IMHO, that is the wrong approach. There are just
> too many
> advantages to separating the object rendering and making it part of
> the C or
> V part of MVC instead of the M.
>
DATE : Thu May 08 03:06:17 2008
I don't think it makes the more classic approach wrong - it's just
another way to crack that particular nut, with its own advantages (and
probably disadvantages too, like more code, more dependency between
classes, possibly lower performance, I don't know - but there's no
"one true way" to do it).
But either way, grouping is an exercise in concatenating transforms,
basically.
I'm intrigued by your allusions to shadow drawing, I've had a lot of
problems with that too - it's a performance killer.
Regarding flowing text around objects, do you have a function for
breaking an arbitrary shape into a series of line rectangles that
you'd be prepared to share with the world?
G.
On 8 May 2008, at 3:31 am, Gordon Apple wrote:
> This is a major advantage of separating the drawing (rendering)
> code
> from the data model instead of having objects draw themselves (not to
> mention cross-platform). Our renderer object is recursive (and
> could be a
> shared object if not for the deficiencies in shadow rendering -- a
> story for
> another time). When we replace objects with a group object, all the
> transforms automatically work. Grouping can be nested to any
> level. Since
> we only have one "Shape" type, groups can also take on object
> characteristics such as fills, content, text, etc. This especially
> works
> well for using group objects for sophisticated text containers where
> text
> flows around contained objects.
>
> I know that about every example of drawing has subclassed objects
> that
> draw themselves. IMHO, that is the wrong approach. There are just
> too many
> advantages to separating the object rendering and making it part of
> the C or
> V part of MVC instead of the M.
>
| Related mails | Author | Date |
|---|---|---|
| Gordon Apple | May 7, 19:31 | |
| Kenny Leung | May 7, 19:44 | |
| Graham Cox | May 8, 03:06 |






Cocoa mail archive

