Hello again,

On Thu, Apr 19, 2012 at 1:42 AM, Chris Debenham <[email protected]> wrote:

> I do a similar to this in Lyricue (which is used to display
> text/images/video to a projector - It also shows small preview versions
> using scaling)
> Basically what I do is tell the app to be fullscreen, then get the window
> width/height
> That those values and figure out the scale of each compared to your design
> res
> I put all elements of the design under a single clutter_group and then use
> 'clutter_actor_set_scale' to scale the dimensions.
> ie:
>     stage_width = 1600;
>     stage_height = 900;
>     stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED
> (clutter_widget));
>     actors = clutter_group_new ();
>     clutter_container_add (CLUTTER_CONTAINER (stage), actors, NULL);
>     double window_scale_w =
>       (double) clutter_actor_get_width (stage) / (double) stage_width;
>     double window_scale_h =
>       (double) clutter_actor_get_height (stage) / (double) stage_height;
>     clutter_actor_set_scale (actors, window_scale_w, window_scale_h);
>
>
Also, is there something I can bind to the stage to get it to update when
the window changes resolutions? I tried binding with
        #self.stage.connect('allocation-changed', self.handleResize)
And though the callback fires, it doesn't scale the stage properly.

Thanks,
andrew



>
> On 19 April 2012 00:58, Andrew Melo <[email protected]> wrote:
>
>> Hello,
>>
>> I'm new to clutter and I'm not really sure how to implement the following:
>>
>> I'm working on a "dashboard" to monitor some services we run. It's
>> intended to be run full-screen on both large monitors we have around the
>> office or from administrators' laptops/desktops. Because of this, there are
>> a large number of target resolutions. However, it appears the in-clutter
>> units are set to pixels.
>>
>> Is there a way to scale the stage so that the it's always
>> (0,0)-(1600,900), regardless of the resolution? (if the aspect ratio of the
>> stage is wrong, I'm indifferent to whether the stage is stretched or
>> letterboxed)
>>
>> Sorry if this is an easy question, but I couldn't find anything in the
>> API or online (perhaps I'm searching wrong)
>>
>> Thanks,
>> Andrew
>>
>> --
>> --
>> Andrew Melo
>>
>>
>> _______________________________________________
>> clutter-app-devel-list mailing list
>> [email protected]
>> http://lists.clutter-project.org/listinfo/clutter-app-devel-list
>>
>>
>


-- 
--
Andrew Melo
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to