Bug #82

improving Bitmap zooming quality

Added by W. Luo over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:10/29/2015
Priority:NormalDue date:
Assignee:W. Luo% Done:

0%

Category:-
Target version:1.7
Forum topic:

Description

BB can draw bitmap easily into a textview ,
but the qulality is bad when it is zoom in or out.

e,g:
1,open a empty window(textview);
2,past a picture to it;
3,drag the view's border to scale it;
4,then You will find the picture is drawn ugly.

my patch is add two line code at HostPorts.Rider.DrawBitmap:
...
>>res := WinApi.SetStretchBltMode(dc, WinApi.HALFTONE); <<add this line
>>res:=WinApi.SetBrushOrgEx(dc, 0, 0, NIL); <<add this line
res := WinApi.StretchBlt(dc, x DIV u, y DIV u, w DIV u, h DIV u, bmdc, 0, 0, bw, bh, copy)
....

Associated revisions

Revision c743f754
Added by J. Templ over 3 years ago

improving Bitmap zooming quality. Refs: #82.
As proposed by luowy the HALFTONE stretch mode is used in HostPorts.Rider.DrawBitmap for improved rendering of zoomed bitmaps.

Signed-off-by: Josef Templ <>

Revision ea919b98
Added by J. Templ over 3 years ago

Merge pull request #79 from BlackBoxCenter/issue-#82

improving Bitmap zooming quality. Refs: #82.

History

#1 Updated by J. Templ over 3 years ago

  • Subject changed from Bitmap Paint Quality to improving Bitmap zooming quality
  • Target version set to 1.7

#2 Updated by J. Templ over 3 years ago

  • Status changed from New to Closed

Also available in: Atom PDF