- This topic has 4 replies, 2 voices, and was last updated 9 years, 6 months ago by Support.
-
AuthorPosts
-
May 18, 2015 at 2:38 pm #36520KujoParticipant
Hello,
I just installed version 10.03 and I found some differencies between this version and 9.20:
Code:DefaultManager.gd[SkinIndex].FontColor[1]is changed.
Can I use the following code?
Code:DefaultManager.gd[SkinIndex].Props[0].FontColor.Color
Code:sFramebar.Arranging := True;
for I := 0 to (sFrameBar.Items.Count – 1) do
sFrameBar.Items.Visible := sFrameBar.Items.State = stOpened;
sFramebar.Arranging := False;
sFrameBar.ArrangeTitles;causes the following error during the compilation:
Code:[DCC Error] dlgAllResults.pas(236): E2362 Cannot access protected symbol TsFrameBar.ArrangingBefore this property was “public”. Without this property, if you have a lot of Framebar to hide, you can see a sort of “scrolling”.
Code:ConvertMaskToAlphawas a function declared in sAlphaGraph.pas but now is not more present. What I have to use now?
If can be useful, I can post a piece of code where I use this function to extract glyphs from the skin such as radiobuttons and checkboxes.
Thank you in advance.
May 19, 2015 at 6:01 am #53411SupportKeymaster'Kujo' wrote:Can I use the following code?Code:DefaultManager.gd[SkinIndex].Props[0].FontColor.ColorYes, this code is correct, Props array contains properties for different states of control.
Quote:Code:[DCC Error] dlgAllResults.pas(236): E2362 Cannot access protected symbol TsFrameBar.ArrangingBefore this property was “public”. Without this property, if you have a lot of Framebar to hide, you can see a sort of “scrolling”.
You are right, “Arranging” will be public at the nearest release.
Quote:Code:ConvertMaskToAlphawas a function declared in sAlphaGraph.pas but now is not more present. What I have to use now?
If can be useful, I can post a piece of code where I use this function to extract glyphs from the skin such as radiobuttons and checkboxes.
This function is not used in the package and has been removed, but you can include it in your project:
Code:procedure ConvertMaskToAlpha(const DstBmp, SrcBmp: TBitmap; DstRect, SrcRect: TRect);
var
w, h, Y, X: integer;
S0, D0, S, D: PRGBAArray;
DeltaS, DeltaD: integer;
begin
w := WidthOf(SrcRect, True);
h := HeightOf(SrcRect, True) div 2;
if (w = 0) or (h = 0) then
Exit;if (w WidthOf(DstRect)) or (h HeightOf(DstRect)) then
Exit;// Copy mask (red channel) as AlphaChannel
if InitLine(SrcBmp, Pointer(S0), DeltaS) and InitLine(DstBmp, Pointer(D0), DeltaD) then
for Y := 0 to h – 1 do begin
S := Pointer(LongInt(S0) + DeltaS * (SrcRect.Top + Y + h));
D := Pointer(LongInt(D0) + DeltaD * (DstRect.Top + Y));
for X := 0 to w – 1 do
D[DstRect.Left + X].A := MaxByte – S[SrcRect.Left + X].R;
end;
end;uses sGraphUtils;
May 19, 2015 at 8:01 am #53414KujoParticipantThank you very much. :a3:
A question: when (if) you have a moment, could you check the code in attachment?
I use this code to extract the some glyphs (radiobuttons and checkboxes, including the various states and the transparency) from the skin and add they to a sAlphaImageList. This list is connected to the TVirtualStringTree in order to show the skinned radiobuttons and checkboxes (VST.CustomCheckImages and VST.CheckImageKind properties).
I'm asking this because, if you don't use anymore the ConvertMaskToAlpha function, maybe my code can be changed in a more simple solution.
Anyway, thanks again
May 19, 2015 at 8:20 am #53417SupportKeymasterI'll check it soon.
May 21, 2015 at 11:22 am #53427SupportKeymasterHi! Your code is correct and I can't optimize it more. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.