Opened 9 months ago

Last modified 5 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: Blocking: #5591
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 (6)

comment:1 Changed 9 months ago by jackburton

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 Changed 9 months ago by waddlesplash

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

comment:3 Changed 9 months ago by jackburton

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

comment:4 in reply to:  2 Changed 8 months ago by jackburton

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 8 months ago by jackburton (previous) (diff)

comment:5 Changed 8 months ago by jackburton

Blocking: 5591 added

comment:6 Changed 5 months ago by stippi

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.

Note: See TracTickets for help on using tickets.