Boost logo

Boost Users :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2008-07-10 00:17:47


On Wed, Jul 9, 2008 at 6:42 PM, John Femiani <JOHN.FEMIANI_at_[hidden]> wrote:
> Felipe Magno de Almeida wrote:
>

[sip]

> I think I would like a 'surface' concept,

I think that's what I want too.

> I don't think a GIL view is enough to satisfy it though.

Yes, it probably isn't it.

> I think you will need to be able to associate some kind
> of context with the surface right? A current coordinate-transform
> for instance.

I think we could do something like this:

using namespace surfaces;
using namespace gui;
using namespace gil;

no_anti_aliasing_surface<rgb8_view_t>
image_surface(interleaved_view(w, h, pointer_to_raw));

wnd<> w = create<>( _title = "Titulo" );

surface_create_line(*w, w->origin(), w->origin() + gui::make_point(10, 10));

I guess a coordinate-transform would only be used when projecting
a surface on another right?
When for example drawing an image.

struct my_coordinate_transform
{
  gui::point operator()(surface::pixel_point<std::size_t> pos) const;
};

surface_project(*w, image_surface, my_coordinate_transform());

What do you think?

> --John

Regards,

-- 
Felipe Magno de Almeida

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net