THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/06/2006 at 06:04, xxxxxxxx wrote:
- Ok, my code for the scroll group became this:_<_o:_<_o:p_>_o:p>
ScrollGroupBegin(10, BFH_SCALEFIT|BFV_SCALEFIT, SCROLLGROUP_STATUSBAR | SCROLLGROUP_VERT | SCROLLGROUP_HORIZ);{
GroupBorder(BORDER_IN);
gadgetua = AddUserArea(1006,BFH_CENTER|BFV_CENTER,100,100);
if (gadgetua)
AttachUserArea(ua,gadgetua);
}_T-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
GroupEnd();
_SPAN>
Now the user area has a non-zero dimension, so when I resize the dialog, the scroll bars works well. The problem now is that the user area look_<_o:_<_o:p_>_rectangle, not as a 100x100 square, as specified in the AddUserArea().
Also, I use DrawBitmap() to draw a picture in the user area. Is it possible to resize the user area according the bitmap size? In my pr_<_o:_<_o:p_>_implementation I used the flag BFH_SCALEFIT|BFV_SCALEFIT, but it didn't work.
_nother question: I used this code to render a frame and get the image alpha channel:
if((RenderDocume_<_o:_<_o:p_>_ rd, NULL, NULL, bitmap, RENDERFLAG_EXTERNAL, NULL, NOTOK, NOTOK, NOTOK, NOTOK)) == RAY_OK)
_EN-GB style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB">.
.
.
AlphaBitmap* channel = bitmap->GetChannelNum(0);
UWORD alpha = 0;
for(int i=0; i<x; i++)
{
for(int j=0; j<y; j++)
{
&n;_<_o:_<_o:p_>_sp; bitmap->GetAlphaPixel(channel, i, j, &alpha);
_<_o:_<_o:p_>_nbsp; bitmap->SetPixel(i,j,(LONG)alpha, (LONG)alpha, (LONG)alpha);
_ style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'">}
}
The problem is that the function GetAlphaPixel() returns only zero values, no matter what is there in scene. Any suggestions?_<_o:_<_o:p_>_ss=Msonormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none">Thanks