Loading ...
Sorry, an error occurred while loading the content.

166XP development: strange color results

Expand Messages
  • Christopher Golden
    Nov 26, 2000
    • 0 Attachment
      One of the XP commands that I've written has been exhibiting
      some irritating behavior for a while now, and I haven't been
      able to figure out why it is doing this. Sometimes, and not
      according to any pattern that I can discern, the entities
      created by this XP end up with the wrong coloration. I use
      the GetCStuff() function to fill in the CStuff structure of
      the entity. As I understand it, this is supposed to fill in
      the color, thickness, etc. of the entity, using the current
      CC2 values for each of these parameters. Thus, if the user
      has the current color set to palette index 2, GetCStuff()
      will give the new entity this color as well.

      The problem is that the entities end up looking like they
      are white, regardless of the current color. If I check the
      strangely-colored entity using LIST, I find that it gives
      me something like this:

      2D Path: color 2 (SymRef Color) layer 1 (STANDARD)
      line style 0 (Solid) fill style 1 (Solid)
      line width 5.00000 tag # 250190 pen 0.000 mm 2nd color 2
      smoothing method: No Smoothing
      start parameter 0.00000, end parameter 3.00000
      length 336.59656, area 0.00000, with 4 nodes:
      node 1 at 1657.97632,1155.39233
      node 2 at 1721.31238,1168.82727
      node 3 at 1755.85938,974.98053
      node 4 at 1682.92688,957.70703

      Note that CC2 thinks that the entity has color 2 (which is
      indeed the color I had selected as the current CC2 color
      right before I created the entity), but it incorrectly iden-
      tifies this color as the "SymRef Color" instead of "red".

      Of course, I can change the color of the entity manually to
      the correct color, but this gets tedious in the extreme af-
      ter a while. Has anyone else seen CC2 behave in this manner
      before? I am sure that I'm doing something wrong in my XP
      code, if for no other reason than the fact that CC2's core
      entity-creation commands never do this, but I can't figure
      out what I've gotten wrong.

      Christopher Golden
    • Show all 3 messages in this topic