Patterns work around & requests

John Rule johnrule at rcsprogramming.com
Wed Mar 6 15:00:01 EST 2002


>> If I then transfer this stack to a Macintosh, the buttons represent the
>> pattern as if the pattern were the size of the stack (or screen). In
other
>> words, the pattern is reflected differently in every button on the Mac
(the
>> pattern is not redrawn at a 0,0, coordinate for each button).
>>
>> I know patterns are 'natively' different on each platform, but this is
odd
>> (and I would think this is wrong).
>>
>> Can anyone verify/explain this?

>From the docs:

>Pattern images can be color or black-and-white. To be used on Mac OS
>systems, patterns must be 128x128 pixels or less, and both its height and
>width must be a power of 2. To be used on Windows and Unix systems, height
>and width must be divisible by 8.

>Does that explain it?

>Kevin


 Thanks for the info Kevin, I just converted all of my patterns to 128 x 128
(this might be a good 'tip' for cross-platform beginners). The patterns work
fine on both platforms at this size now...

 It doesn't explain what I was seeing though...the pattern was not being
drawn within the object at a 0,0 coordinate. It seems to me that I could
have avoided all of this if it (the engine) drew the pattern starting at the
upper left of each object that it was separately assigned to.

  The only reason I am using patterns in this manner is because I cannot
have the text name of the object appear in the center any other way. If I
assign my imported pattern/image as an icon, the name now appears underneath
the button. I played with the margins, but the text just disappears behind
the button as I go up. Which brings me to some feature requests:

Button name centered with object (for buttons with images/icons...patterns
are ok)
Text on color
Text off color
Button on text
Button off text


JR






More information about the use-livecode mailing list