Menu

#539 PictureBox color

v_5.0_Alpha
closed-wont-fix
ARX 2007 (210)
5
2008-11-19
2008-11-10
OlegBeron
No

My function select color using ACAD_TRUECOLORDLG and show this color using dcl_PictureBox_DrawFillRect.
All work right, but if Green and Blue color components equal zero then dcl_PictureBox_DrawFillRect make incorrect color.
For example, if I select Red Color (RGB = 123, 0,0) as result I see blue color.

Discussion

  • OlegBeron

    OlegBeron - 2008-11-10

    Bug example

     
  • OlegBeron

    OlegBeron - 2008-11-10
    • labels: --> ARX 2007
    • assigned_to: nobody --> owenwengerd
    • milestone: --> v_5.0_Alpha
     
  • Owen Wengerd

    Owen Wengerd - 2008-11-10

    I tested this in Beta 2 and it worked correctly, displaying a red rectangle. Please test again in the current build and let me know whether you still notice the problem.

     
  • Owen Wengerd

    Owen Wengerd - 2008-11-10
    • status: open --> closed-works-for-me
     
  • OlegBeron

    OlegBeron - 2008-11-12
    • status: closed-works-for-me --> open-works-for-me
     
  • OlegBeron

    OlegBeron - 2008-11-12

    Now I install Beta 2 (AutoCAD 2008, Windows XP)
    Bag is presented
    Can I help you to find this bag?

     
  • Owen Wengerd

    Owen Wengerd - 2008-11-19

    Please post a simple sample .odcl and .lsp that demonstrate the problem.

     
  • Nobody/Anonymous

    I attached example (colortest.ZIP) in my first message. Did you see it?

     
  • Owen Wengerd

    Owen Wengerd - 2008-11-19

    Sorry, I didn't notice the attachment. What you're seeing is by design. When the argument is less than 255 (as it is in the case you found), OpenDCL interprets it as an AutoCAD color index instead of an RGB color.

    I was going to suggest adding 268435456 to the color number so that it isn't interpreted as a color index, but that won't work in beta 2 (it will in beta 3). It looks like the only solution is to return a list instead of a single RGB value. Try changing the last line of the ConvertAcadTrueColorToWindowsColor function to the following:
    (list Red Green Blue)

    This could also have problems with certain red values causing AutoCAD to interpret the list as DXF codes, as discussed elsewhere. The only foolproof solution is to add 268435456 (0x10000000) to the RGB color, but this won't work until beta 3.

     
  • Owen Wengerd

    Owen Wengerd - 2008-11-19
    • status: open-works-for-me --> closed-wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB