BPicture: add missing WriteSetBlendingMode method.
Actual blending mode writing is still disabled for now. According to previous commit messages it cause problems with BView::Begin/EndLayer API. Change-Id: Ib3c58b05a949e556e9f14a57822b20cd259e12d4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8559 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -42,6 +42,8 @@ public:
|
||||
const join_mode& join,
|
||||
const float& miterLimit);
|
||||
status_t WriteSetFillRule(int32 fillRule);
|
||||
status_t WriteSetBlendingMode(source_alpha srcAlpha,
|
||||
alpha_function alphaFunc);
|
||||
status_t WriteSetScale(const float& scale);
|
||||
status_t WriteSetTransform(BAffineTransform transform);
|
||||
status_t WriteTranslateBy(double x, double y);
|
||||
|
||||
@@ -171,6 +171,22 @@ PictureDataWriter::WriteSetFillRule(int32 fillRule)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
PictureDataWriter::WriteSetBlendingMode(source_alpha srcAlpha, alpha_function alphaFunc)
|
||||
{
|
||||
try {
|
||||
BeginOp(B_PIC_SET_BLENDING_MODE);
|
||||
Write<int16>(srcAlpha);
|
||||
Write<int16>(alphaFunc);
|
||||
EndOp();
|
||||
} catch (status_t& status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
PictureDataWriter::WriteSetScale(const float& scale)
|
||||
{
|
||||
|
||||
@@ -4099,23 +4099,22 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
// TODO: disabled without explanation in hrev19264. investigate problem and enable
|
||||
#if 0
|
||||
case AS_VIEW_SET_BLENDING_MODE:
|
||||
{
|
||||
ViewBlendingModeInfo info;
|
||||
link.Read<ViewBlendingModeInfo>(&info);
|
||||
|
||||
picture->BeginOp(B_PIC_SET_BLENDING_MODE);
|
||||
picture->AddInt16((int16)info.sourceAlpha);
|
||||
picture->AddInt16((int16)info.alphaFunction);
|
||||
picture->EndOp();
|
||||
picture->WriteSetBlendingMode(info.sourceAlpha, info.alphaFunction);
|
||||
|
||||
fCurrentView->CurrentState()->SetBlendingMode(info.sourceAlpha,
|
||||
info.alphaFunction);
|
||||
fWindow->GetDrawingEngine()->SetBlendingMode(info.sourceAlpha,
|
||||
info.alphaFunction);
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user