[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d...

From: Udo Giacomozzi
Subject: Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d...
Date: Mon, 12 Nov 2007 10:57:24 +0100

Hello strk,

Monday, November 12, 2007, 10:35:14 AM, you wrote:
s> Maybe we can remember wheter we changed the shape due to forced
s> closing or not, and if we did we can wipe out the last edge on next
s> editing. Still the stroke thing remains, unless we always close
s> using an new path (with m_new_shape=false and lineStyle=0).

What we need are two *views* of the definiton. One view is for all
ActionScript stuff and exactly matches what the user defines. The
second view is for the renderer and point test algorithm (and who
knows what else). We should not mix them up.

Can't we simply change the "path" class so that it provides addition
access methods? I mean a new version of size() and at():

bool path::needImplicitClose() {
  if (empty()) return false;
  if (!thisBelongsToADynamicShape()) return false; // IMPORTANT!!!
  return (m_edges[size()-1].ap != ap);

size_t path::sizeClosed() {
  if (needImplicitClose())
    return size()+1;
    return size();

edge& path::getEdgeClosed(size_t index) {

  if (index<size())
    return m_edges[index];

  if ((index==size()) && (needImplicitClose()))
    return dummy_edge_that_closes;

  abort();  // index over range

dummy_edge_that_closes is a "edge" instance held by "path" that is a
straight line to the path anchor.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]