Opened 16 months ago

Last modified 4 months ago

#14428 new bug

BPicture: Implement DrawString offsets variant

Reported by: jackburton Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: #5591 Blocking:
Has a Patch: no Platform: All

Description

When BView::DrawString(const char* string, int32 length, const BPoint* locations, int32 locationCount) was introduced, it wasn't implemented in BPicture.

It needs to be implemented, otherwise if an application uses that method to draw strings, those strings won't be printed.

Change History (7)

comment:1 by jackburton, 16 months ago

I think it can be implemented without adding a new BPicture op, by just handling each char as a single string. Of course it won't be very efficient.

comment:2 by waddlesplash, 16 months ago

Indeed not, and doing that also messes up font kerning with TTF subpixel hinting enabled. So that's not a good solution.

comment:3 by jackburton, 15 months ago

Right. Anyway, I see we already added new ops to the BPicture format, so I guess that adding some more won't hurt.

in reply to:  2 comment:4 by jackburton, 15 months ago

Replying to waddlesplash:

Indeed not, and doing that also messes up font kerning with TTF subpixel hinting enabled. So that's not a good solution.

I tried to implement it like I said in the previous comment (change 544), and actually it's not that bad. Moreover, since BPictures could be played not only by app_server, but also by other means (we use it for printing, for example), I think we could go with this implementation. At least for now.

Last edited 15 months ago by jackburton (previous) (diff)

comment:5 by jackburton, 15 months ago

Blocking: 5591 added

comment:6 by stippi, 11 months ago

hrev52716 adds a new op in BPicture. PicturePlayer contains a mechanism to handle clients that provide not all callbacks to BPicture::Play(). There the implementation in terms of the other DrawString() method should be added.

comment:7 by waddlesplash, 4 months ago

Blocked By: 5591 added
Blocking: 5591 removed
Note: See TracTickets for help on using tickets.