Problems with AC 10.03 and Delphi XE2

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53411
    Support
    Keymaster
      'Kujo' wrote:
      Can I use the following code?

      Code:
      DefaultManager.gd[SkinIndex].Props[0].FontColor.Color

      Yes, 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.Arranging

      Before 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:
      ConvertMaskToAlpha

      was 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;

      #53414
      Kujo
      Participant

        Thank 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

        #53417
        Support
        Keymaster

          I'll check it soon.

          #53427
          Support
          Keymaster

            Hi! Your code is correct and I can't optimize it more. 🙂

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.