Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6070 closed bug (fixed)

DrawPicture ignores offset (where)

Reported by: laplace Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking: #6008
Platform: All

Description

BView::DrawPicture(BPicture* picture, BPoint where) allways draws the picture at offset (0, 0).

To reproduce run FlattenPictureTest application from src/tests/kits/interface/flatten_picture. Choose from menu Tests > Run. The test case with name "Test Record and Play Picture with Offset" fails. In this test case a picture containing a black fillled rectangle is recorded into a BPicture and then drawn two times at first at point (10, 10) and then at (0, 0). The rectangle at (10, 10) is drawn at (0, 0) too (or not at all, the test case does not reveal that, but it is unlikely).

Attachments (1)

patch.diff (575 bytes ) - added by jackburton 14 years ago.
BPicture offset fix

Download all attachments as: .zip

Change History (11)

comment:1 by laplace, 14 years ago

Blocking: 6008 added

(In #6008) Drawing a BPicture ignores the offset currently (see ticket #6070).

comment:2 by jackburton, 14 years ago

I guess this is a regression, I remember having implemented this long ago.

comment:3 by jackburton, 14 years ago

I'd look at hrev27214 (where I fixed the problem), hrev35472 and hrev35905, for a start.

by jackburton, 14 years ago

Attachment: patch.diff added

BPicture offset fix

comment:4 by jackburton, 14 years ago

patch: 01

comment:5 by jackburton, 14 years ago

The patch fixes the problem. I don't have access to svn right now (and won't have for a while). Please someone apply.

comment:6 by stippi, 14 years ago

Resolution: fixed
Status: newclosed

Makes a lot of sense, applied in hrev36933. Thanks! Did you find out the revision where this was broken by any chance?

comment:7 by jackburton, 14 years ago

looks like hrev33876 was the culprit.

comment:8 by stippi, 14 years ago

Ah yes, now I see it. Two lessons: 1) Leave comments when you do seemingly weird things (although I am not sure this qualifies...) and 2) Always proof-read Axel's commits, hehe.

in reply to:  5 comment:9 by laplace, 14 years ago

Replying to jackburton:

The patch fixes the problem. I don't have access to svn right now (and won't have for a while). Please someone apply.

Thank you that fixes the problem.

in reply to:  8 comment:10 by axeld, 14 years ago

Replying to stippi:

Ah yes, now I see it. Two lessons: 1) Leave comments when you do seemingly weird things (although I am not sure this qualifies...)

A comment would have been nice, but thinking twice would probably have helped as well in this case. At least that's how long it took me this time until I understand why it was indeed needed ;-)

and 2) Always proof-read Axel's commits, hehe.

Yes, please! Sorry for the regression, anyway.

Note: See TracTickets for help on using tickets.