Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » bug in ImageBuffer::Line() and operator[]
Re: bug in ImageBuffer::Line() and operator[] [message #14717 is a reply to message #14711] |
Mon, 10 March 2008 11:19   |
mdelfede
Messages: 1310 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Mon, 10 March 2008 09:36 |
mdelfede wrote on Sun, 09 March 2008 17:46 |
luzr wrote on Sun, 09 March 2008 22:28 |
mdelfede wrote on Sun, 09 March 2008 16:21 | AFAIK ImageBuffer::Line[] (and consequently operator[]), which should return a writeable RGBA* do pick the ImageBuffer container
wiping its contents.
That makes Line() and operator[] quite useless....
Ciao
Max
|
I doubt it. Many things would not work if that would be the case...
Mirek
|
Uhmmm... I'll check it more in depth.... Somewhere my ImageBuffer is loosing its contents; it seemed to me that was just before getting RGBA pointer, but I may be wrong.
EDIT : Sorry for the wrong bug.... It was again the implied conversion between ImageBuffer and Image which wiped ImageBuffer.
I think we should really add Draw::DrawImage(ImageBuffer...) variants OR at least have some sort of message telling that
ImageBuffer was picked.
Max
|
I think the main problem here is that it is too easy to use ImageBuffer outside of its domain.
Orginally, this was only meant to be used as local variable to create or alter Image. In that scenario there are little problems... Conversion from/to Image is very fast. However, DrawImage for ImageBuffer would be quite slow.
Mirek
|
Why ? what I'd do is :
void Draw::DrawImage(ImageBuffer & buf.....)
{
Image Img = buf;
DrawImage(Img......);
buf = Img;
}
That should work, just a few slower than original but would avoid such problems. IMHO ImageBuffer is very comfortable to create an image on the fly and draw it. Of course we can manually do what I coded above, but if you don't know the problem (or if you just don't think about it as in my case) you have a difficult to find error, as the stuff would work on first display cycle but hang on others.
Max
[Updated on: Mon, 10 March 2008 13:21] Report message to a moderator
|
|
|
 |
|
bug in ImageBuffer::Line() and operator[]
By: mdelfede on Sun, 09 March 2008 21:21
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Sun, 09 March 2008 22:28
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mdelfede on Sun, 09 March 2008 22:46
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Mon, 10 March 2008 09:36
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mdelfede on Mon, 10 March 2008 11:19
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Wed, 12 March 2008 14:45
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Wed, 16 April 2008 13:29
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Thu, 17 April 2008 21:44
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Wed, 23 April 2008 10:25
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Wed, 23 April 2008 10:34
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
|
 |
|
Re: bug in ImageBuffer::Line() and operator[]
By: mirek on Wed, 23 April 2008 21:04
|
Goto Forum:
Current Time: Thu Sep 04 02:50:36 CEST 2025
Total time taken to generate the page: 0.04725 seconds
|