Announcement

Collapse
No announcement yet.

Problem with gfx_LinePattern?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AndrewJ
    replied
    That fixed it, thanks.

    Leave a comment:


  • pauleilio
    replied
    Hi Andrew,

    Sorry for the error.The actual library used is in the Arduino15 directory. This is the directory on my PC

    C:\Users\paulc\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib

    Which may be different on your parallels setup

    If you open the Picaso_Const4D.h file in a text editor, you will notice that the constants are missing. Could you please add them at the bottom of the file and then save it.


    // Line Patterns
    #define LPCOARSE 0xF0F0
    #define LPMEDIUM 0x3333
    #define LPFINE 0xAAAA
    #define LPDASHDOT 0x03CF
    #define LPDASHDOTDOT 0x0333
    #define LPSOLID 0x0000

    I will look into why they are missing from the file.

    Best regards

    Paul

    Leave a comment:


  • AndrewJ
    started a topic Problem with gfx_LinePattern?

    Problem with gfx_LinePattern?

    If I use Primitives to create a rectangle on the UI and paste static code, I get this:

    Code:
     
    Display.gfx_OutlineColour(BLACK);  
    Display.gfx_LinePattern(LPFINE);  
    Display.gfx_RectangleFilled(70, 35, 249, 74, LIGHTGREY);  // rectDisplayBack  
    Display.gfx_OutlineColour(BLACK);  
    Display.gfx_LinePattern(LPSOLID);
    When compiling, it complains about LPFINE and LPSOLID:
    ... error: 'LPFINE' was not declared in this scope
    ... error: 'LPSOLID' was not declared in this scope

    These are defined in the standard include file "Picaso_Const4d.h":
    Code:
    // Line Patterns
    #define  LPCOARSE    0xF0F0
    #define  LPMEDIUM    0x3333
    #define  LPFINE      0xAAAA
    #define  LPDASHDOT   0x03CF
    #define  LPDASHDOTDOT 0x0333
    #define  LPSOLID     0x0000
    If I substitute the definition with the actual value, e.g. 0xAAAA it compiles fine:
    Code:
    Display.gfx_LinePattern(0xAAAA);
    It's not my code per-se - I looked at one of the 4Duino samples for Primitives and added a rectangle in to that: compilation generates the same errors. It doesn't complain about the use of "BLACK" for the colours which are defined in the same include file.

Working...
X