Skip to main content

New GRIN: "Visual" RC handler

8 replies [Last post]
billf
Offline
Joined: 2004-02-13
Points: 0

Just a quick note: I just uploaded an improved remote control handler to GRIN, over at the hdcookbook.dev.java.net repository. This features a grid-based state model that I think will support any arrow-key based navigation pattern that's wanted. It will make handling mouse-based input fairly easy when that part is finished, which should be within a week if all goes well.

Cheers,

Bill

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joe Rice

Hey Bill -

Thanks for implementing the vspace property - it seems to be working
as intended. (Tested in PowerDVD and PS3 so far)

Cheers,
Joe

[att1.html]

Joe Rice

Is this command functional? What should it do? It appears in the GRIN
docs, but doesn't appear in any of the GRIN classes, and causes an
exception when used.

assembly_cell_status ::= "assembly_cell_status" ";"

Cheers,
Joe
[att1.html]

Joe Rice

Are anchors fixed to top left corner in GRIN, or is there a way to
specify other anchor points for an image or text? For text
especially, a lower-left anchor would be useful.

Cheers,
Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Bill Foote

Joe Rice wrote:
> Are anchors fixed to top left corner in GRIN, or is there a way to
> specify other anchor points for an image or text? For text especially, a
> lower-left anchor would be useful.
>
> Cheers,
> Joe

Top-left right now, I think, but it sounds like a simple enough
extension. Do you mean lower-left, or do you mean "left on the
baseline"? Or could both be useful? Any preference on what to
call an optional alignment keyword? "align_bottom", "align_baseline"
and "align_top" are what immediately spring to mind for me.

BTW, I probably won't be able to do a putback until next
Saturday... I'll be at the BDA meeting coding away, but I
don't have CVS set up yet on my new, huge Windows laptop.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Joe Rice

Bill -

Thanks for the quick response. I consulted with a designer, and he
has this input towards an ideal scenario:

_____

We are talking about a bounding box description, correct?

Not sure if that applies to text, always. In the case of a "T" for
example we need to make sure that the X coordinate of the top
crossbar is what defines the x coordinate.

if all that is the case, it would be good to be able to set 9 anchor
points:

Top left
Top Center
Top Right
Bottom left
Bottom Center
Bottom Right
Left Center
Center Center
Right Center

Especially for Java driven animation this will be great, as you can
then scale and rotate elements around different anchor points."
_____

I suppose baseline would be useful for text as well as being able to
use a definite lower value. For instance, the baseline of a "g"
wouldn't count the descender, but we might want to make sure that the
text doesn't extend beyond some other element on screen, so would
wand to align text based on the lower limit of any character's
descender.

The suggested alignment keywords sound like the right direction to go
for those.

Enjoy Hawaii!

Cheers,
Joe

On May 18, 2007, at 3:17 PM, Bill Foote wrote:

> Joe Rice wrote:
>> Are anchors fixed to top left corner in GRIN, or is there a way to
>> specify other anchor points for an image or text? For text
>> especially, a lower-left anchor would be useful.
>> Cheers,
>> Joe
>
>
> Top-left right now, I think, but it sounds like a simple enough
> extension. Do you mean lower-left, or do you mean "left on the
> baseline"? Or could both be useful? Any preference on what to
> call an optional alignment keyword? "align_bottom", "align_baseline"
> and "align_top" are what immediately spring to mind for me.
>
> BTW, I probably won't be able to do a putback until next
> Saturday... I'll be at the BDA meeting coding away, but I
> don't have CVS set up yet on my new, huge Windows laptop.
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

[att1.html]

Joe Rice

Is it possible to force some part of a text feature to a new line, or
must a new text feature be created for each line of text?

(eg something like:

feature text F.Text.MultipleLines
643 811
"This is line 1" /r
"This is line 2"
"fonts/00001.otf" "HelveticaNeue" "plain" 36 {
{ 255 255 255 255 }
}
;

or

feature text F.Text.MultipleLines
643 811
"This is line 1 /r This is line 2"
"fonts/00001.otf" "HelveticaNeue" "plain" 36 {
{ 255 255 255 255 }
}
;

Cheers,
Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Bill Foote

Hey Joe,

I haven't done a checkin yet - it's easier for me if I delay
until I get back from Maui, since part of my build environment is
on my mac, which I don't have here. Anyway, here's what I got
working this morning:

feature text F_test_text 100 100
{ "This is a test" "of multi-line" "text" }
vspace 8
fake_font.otf Braggadocio plain 30 {
<...>

Decent enough?

Note the vspace - that number of pixels to put between
lines. Negative numbers are OK if you want really crowded,
overlapping text! The formal syntax is:

text ::= "feature" "text" name x y text_strings font_spec
color_spec ";"

text_strings ::= string | "{" string * "}" [ "vspace" integer ]

where each string is on its own line.

About the anchor point - it's now fixed at the upper-left hand
corner. I think that before it was the left hand side on the
baseline, which is inconsistent with the rest of GRIN. As to
doing the fancy stuff, with different options for the anchor point...
I hope I can defer that until we bring FX (nee F3) into the picture.
For now, you can (pretty accurately) figure out the size of what
you're displaying, and manually add or subtract the right amount
from the x,y position, I hope.

Is that livable?

Aloha,

Bill

Joe Rice wrote:
> Is it possible to force some part of a text feature to a new line, or
> must a new text feature be created for each line of text?
>
> (eg something like:
>
> feature text F.Text.MultipleLines
> 643 811
> "This is line 1" /r
> "This is line 2"
> "fonts/00001.otf" "HelveticaNeue" "plain" 36 {
> { 255 255 255 255 }
> }
> ;
>
>
> or
>
> feature text F.Text.MultipleLines
> 643 811
> "This is line 1 /r This is line 2"
> "fonts/00001.otf" "HelveticaNeue" "plain" 36 {
> { 255 255 255 255 }
> }
> ;
>
>
> Cheers,
> Joe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Joe Rice

Thanks Bill, that'll do the trick.

Joe

On May 23, 2007, at 1:20 AM, Bill Foote wrote:

>
>
> Hey Joe,
>
> I haven't done a checkin yet - it's easier for me if I delay
> until I get back from Maui, since part of my build environment is
> on my mac, which I don't have here. Anyway, here's what I got
> working this morning:
>
> feature text F_test_text 100 100
> { "This is a test" "of multi-line" "text" }
> vspace 8
> fake_font.otf Braggadocio plain 30 {
> <...>
>
> Decent enough?
>
> Note the vspace - that number of pixels to put between
> lines. Negative numbers are OK if you want really crowded,
> overlapping text! The formal syntax is:
>
> text ::= "feature" "text" name x y text_strings font_spec
> color_spec ";"
>
> text_strings ::= string | "{" string * "}" [ "vspace" integer ]
>
> where each string is on its own line.
>
>
> About the anchor point - it's now fixed at the upper-left hand
> corner. I think that before it was the left hand side on the
> baseline, which is inconsistent with the rest of GRIN. As to
> doing the fancy stuff, with different options for the anchor point...
> I hope I can defer that until we bring FX (nee F3) into the picture.
> For now, you can (pretty accurately) figure out the size of what
> you're displaying, and manually add or subtract the right amount
> from the x,y position, I hope.
>
> Is that livable?
>
> Aloha,
>
> Bill
>
>
> Joe Rice wrote:
>> Is it possible to force some part of a text feature to a new line,
>> or must a new text feature be created for each line of text?
>> (eg something like:
>> feature text F.Text.MultipleLines
>> 643 811
>> "This is line 1" /r
>> "This is line 2"
>> "fonts/00001.otf" "HelveticaNeue" "plain" 36 {
>> { 255 255 255 255 }
>> }
>> ;
>> or
>> feature text F.Text.MultipleLines
>> 643 811
>> "This is line 1 /r This is line 2"
>> "fonts/00001.otf" "HelveticaNeue" "plain" 36 {
>> { 255 255 255 255 }
>> }
>> ;
>> Cheers,
>> Joe
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
>> For additional commands, e-mail: bd-j-dev-
>> help@hdcookbook.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

[att1.html]