Changeset 180


Ignore:
Timestamp:
Jun 23, 2019, 11:57:39 PM (6 years ago)
Author:
chronos
Message:
Location:
branches/highdpi
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Integrated.lpi

    r178 r180  
    9999      </Item3>
    100100    </RequiredPackages>
    101     <Units Count="41">
     101    <Units Count="40">
    102102      <Unit0>
    103103        <Filename Value="Integrated.lpr"/>
     
    207207      </Unit20>
    208208      <Unit21>
    209         <Filename Value="LocalPlayer\BaseWin.pas"/>
    210         <IsPartOfProject Value="True"/>
     209        <Filename Value="LocalPlayer\Help.pas"/>
     210        <IsPartOfProject Value="True"/>
     211        <ComponentName Value="HelpDlg"/>
     212        <HasResources Value="True"/>
     213        <ResourceBaseClass Value="Form"/>
    211214      </Unit21>
    212215      <Unit22>
    213         <Filename Value="LocalPlayer\Help.pas"/>
    214         <IsPartOfProject Value="True"/>
    215         <ComponentName Value="HelpDlg"/>
     216        <Filename Value="LocalPlayer\Select.pas"/>
     217        <IsPartOfProject Value="True"/>
     218        <ComponentName Value="ListDlg"/>
    216219        <HasResources Value="True"/>
    217220        <ResourceBaseClass Value="Form"/>
    218221      </Unit22>
    219222      <Unit23>
    220         <Filename Value="LocalPlayer\Select.pas"/>
    221         <IsPartOfProject Value="True"/>
    222         <ComponentName Value="ListDlg"/>
     223        <Filename Value="LocalPlayer\CityScreen.pas"/>
     224        <IsPartOfProject Value="True"/>
     225        <ComponentName Value="CityDlg"/>
    223226        <HasResources Value="True"/>
    224227        <ResourceBaseClass Value="Form"/>
    225228      </Unit23>
    226229      <Unit24>
    227         <Filename Value="LocalPlayer\CityScreen.pas"/>
    228         <IsPartOfProject Value="True"/>
    229         <ComponentName Value="CityDlg"/>
     230        <Filename Value="LocalPlayer\UnitStat.pas"/>
     231        <IsPartOfProject Value="True"/>
     232        <ComponentName Value="UnitStatDlg"/>
    230233        <HasResources Value="True"/>
    231234        <ResourceBaseClass Value="Form"/>
    232235      </Unit24>
    233236      <Unit25>
    234         <Filename Value="LocalPlayer\UnitStat.pas"/>
    235         <IsPartOfProject Value="True"/>
    236         <ComponentName Value="UnitStatDlg"/>
     237        <Filename Value="LocalPlayer\Draft.pas"/>
     238        <IsPartOfProject Value="True"/>
     239        <ComponentName Value="DraftDlg"/>
    237240        <HasResources Value="True"/>
    238241        <ResourceBaseClass Value="Form"/>
    239242      </Unit25>
    240243      <Unit26>
    241         <Filename Value="LocalPlayer\Draft.pas"/>
    242         <IsPartOfProject Value="True"/>
    243         <ComponentName Value="DraftDlg"/>
     244        <Filename Value="LocalPlayer\NatStat.pas"/>
     245        <IsPartOfProject Value="True"/>
     246        <ComponentName Value="NatStatDlg"/>
    244247        <HasResources Value="True"/>
    245248        <ResourceBaseClass Value="Form"/>
    246249      </Unit26>
    247250      <Unit27>
    248         <Filename Value="LocalPlayer\NatStat.pas"/>
    249         <IsPartOfProject Value="True"/>
    250         <ComponentName Value="NatStatDlg"/>
     251        <Filename Value="LocalPlayer\Diagram.pas"/>
     252        <IsPartOfProject Value="True"/>
     253        <ComponentName Value="DiaDlg"/>
    251254        <HasResources Value="True"/>
    252255        <ResourceBaseClass Value="Form"/>
    253256      </Unit27>
    254257      <Unit28>
    255         <Filename Value="LocalPlayer\Diagram.pas"/>
    256         <IsPartOfProject Value="True"/>
    257         <ComponentName Value="DiaDlg"/>
     258        <Filename Value="LocalPlayer\Wonders.pas"/>
     259        <IsPartOfProject Value="True"/>
     260        <ComponentName Value="WondersDlg"/>
    258261        <HasResources Value="True"/>
    259262        <ResourceBaseClass Value="Form"/>
    260263      </Unit28>
    261264      <Unit29>
    262         <Filename Value="LocalPlayer\Wonders.pas"/>
    263         <IsPartOfProject Value="True"/>
    264         <ComponentName Value="WondersDlg"/>
     265        <Filename Value="LocalPlayer\Nego.pas"/>
     266        <IsPartOfProject Value="True"/>
     267        <ComponentName Value="NegoDlg"/>
    265268        <HasResources Value="True"/>
    266269        <ResourceBaseClass Value="Form"/>
    267270      </Unit29>
    268271      <Unit30>
    269         <Filename Value="LocalPlayer\Nego.pas"/>
    270         <IsPartOfProject Value="True"/>
    271         <ComponentName Value="NegoDlg"/>
     272        <Filename Value="LocalPlayer\CityType.pas"/>
     273        <IsPartOfProject Value="True"/>
     274        <ComponentName Value="CityTypeDlg"/>
    272275        <HasResources Value="True"/>
    273276        <ResourceBaseClass Value="Form"/>
    274277      </Unit30>
    275278      <Unit31>
    276         <Filename Value="LocalPlayer\CityType.pas"/>
    277         <IsPartOfProject Value="True"/>
    278         <ComponentName Value="CityTypeDlg"/>
     279        <Filename Value="LocalPlayer\Enhance.pas"/>
     280        <IsPartOfProject Value="True"/>
     281        <ComponentName Value="EnhanceDlg"/>
    279282        <HasResources Value="True"/>
    280283        <ResourceBaseClass Value="Form"/>
    281284      </Unit31>
    282285      <Unit32>
    283         <Filename Value="LocalPlayer\Enhance.pas"/>
    284         <IsPartOfProject Value="True"/>
    285         <ComponentName Value="EnhanceDlg"/>
     286        <Filename Value="NoTerm.pas"/>
     287        <IsPartOfProject Value="True"/>
     288        <ComponentName Value="NoTermDlg"/>
    286289        <HasResources Value="True"/>
    287290        <ResourceBaseClass Value="Form"/>
    288291      </Unit32>
    289292      <Unit33>
    290         <Filename Value="NoTerm.pas"/>
    291         <IsPartOfProject Value="True"/>
    292         <ComponentName Value="NoTermDlg"/>
     293        <Filename Value="LocalPlayer\Battle.pas"/>
     294        <IsPartOfProject Value="True"/>
     295        <ComponentName Value="BattleDlg"/>
    293296        <HasResources Value="True"/>
    294297        <ResourceBaseClass Value="Form"/>
    295298      </Unit33>
    296299      <Unit34>
    297         <Filename Value="LocalPlayer\Battle.pas"/>
    298         <IsPartOfProject Value="True"/>
    299         <ComponentName Value="BattleDlg"/>
     300        <Filename Value="LocalPlayer\Rates.pas"/>
     301        <IsPartOfProject Value="True"/>
     302        <ComponentName Value="RatesDlg"/>
    300303        <HasResources Value="True"/>
    301304        <ResourceBaseClass Value="Form"/>
    302305      </Unit34>
    303306      <Unit35>
    304         <Filename Value="LocalPlayer\Rates.pas"/>
    305         <IsPartOfProject Value="True"/>
    306         <ComponentName Value="RatesDlg"/>
     307        <Filename Value="LocalPlayer\TechTree.pas"/>
     308        <IsPartOfProject Value="True"/>
     309        <ComponentName Value="TechTreeDlg"/>
    307310        <HasResources Value="True"/>
    308311        <ResourceBaseClass Value="Form"/>
    309312      </Unit35>
    310313      <Unit36>
    311         <Filename Value="LocalPlayer\TechTree.pas"/>
    312         <IsPartOfProject Value="True"/>
    313         <ComponentName Value="TechTreeDlg"/>
    314         <HasResources Value="True"/>
    315         <ResourceBaseClass Value="Form"/>
     314        <Filename Value="Platform.pas"/>
     315        <IsPartOfProject Value="True"/>
    316316      </Unit36>
    317317      <Unit37>
    318         <Filename Value="Platform.pas"/>
     318        <Filename Value="Switches.inc"/>
    319319        <IsPartOfProject Value="True"/>
    320320      </Unit37>
    321321      <Unit38>
    322         <Filename Value="Switches.inc"/>
    323         <IsPartOfProject Value="True"/>
     322        <Filename Value="Locale.pas"/>
     323        <IsPartOfProject Value="True"/>
     324        <ComponentName Value="LocaleDlg"/>
     325        <HasResources Value="True"/>
    324326      </Unit38>
    325327      <Unit39>
    326         <Filename Value="Locale.pas"/>
    327         <IsPartOfProject Value="True"/>
    328         <ComponentName Value="LocaleDlg"/>
    329         <HasResources Value="True"/>
     328        <Filename Value="IPQ.pas"/>
     329        <IsPartOfProject Value="True"/>
    330330      </Unit39>
    331       <Unit40>
    332         <Filename Value="IPQ.pas"/>
    333         <IsPartOfProject Value="True"/>
    334       </Unit40>
    335331    </Units>
    336332  </ProjectOptions>
  • branches/highdpi/Integrated.lpr

    r178 r180  
    2424  Term in 'LocalPlayer\Term.pas' {MainScreen} ,
    2525  MessgEx in 'LocalPlayer\MessgEx.pas' {MessgExDlg} ,
    26   BaseWin in 'LocalPlayer\BaseWin.pas',
    2726  Help in 'LocalPlayer\Help.pas' {HelpDlg} ,
    2827  Select in 'LocalPlayer\Select.pas' {ListDlg} ,
  • branches/highdpi/Packages/CevoComponents/BaseWin.pas

    r178 r180  
    165165procedure TBufferedDrawDlg.VPaint;
    166166begin
    167   BitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     167  DpiBitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    168168    Offscreen.Canvas.Handle, 0, 0, SRCCOPY);
    169169end;
     
    278278  else
    279279    BottomFrame := NarrowFrame;
    280   r0 := CreateRectRgn(SideFrame, TitleHeight, ClientWidth - SideFrame,
     280  r0 := DpiCreateRectRgn(SideFrame, TitleHeight, ClientWidth - SideFrame,
    281281    ClientHeight - BottomFrame);
    282282  for i := 0 to ControlCount - 1 do
     
    284284    begin
    285285      with Controls[i].BoundsRect do
    286         r1 := CreateRectRgn(Left, Top, Right, Bottom);
     286        r1 := DpiCreateRectRgn(Left, Top, Right, Bottom);
    287287      CombineRgn(r0, r0, r1, RGN_DIFF);
    288288      DeleteObject(r1);
     
    454454    end;
    455455
    456   BitBlt(Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,
     456  DpiBitBlt(Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,
    457457    InnerBottom - TitleHeight, Offscreen.Canvas.Handle, 0, 0, SRCCOPY);
    458458end;
     
    464464  if FullCaption then
    465465    exit;
    466   r0 := CreateRectRgn(0, 0, ClientWidth, ClientHeight);
    467   r1 := CreateRectRgn(0, 0, CaptionLeft, TitleHeight - NarrowFrame);
     466  r0 := DpiCreateRectRgn(0, 0, ClientWidth, ClientHeight);
     467  r1 := DpiCreateRectRgn(0, 0, CaptionLeft, TitleHeight - NarrowFrame);
    468468  CombineRgn(r0, r0, r1, RGN_DIFF);
    469469  // DeleteObject(r1);
    470   r1 := CreateRectRgn(ClientWidth - CaptionLeft, 0, ClientWidth,
     470  r1 := DpiCreateRectRgn(ClientWidth - CaptionLeft, 0, ClientWidth,
    471471    TitleHeight - NarrowFrame);
    472472  CombineRgn(r0, r0, r1, RGN_DIFF);
     
    474474  if WideBottom then
    475475  begin
    476     r1 := CreateRectRgn(0, ClientHeight - (WideFrame - NarrowFrame),
     476    r1 := DpiCreateRectRgn(0, ClientHeight - (WideFrame - NarrowFrame),
    477477      CaptionLeft, ClientHeight);
    478478    CombineRgn(r0, r0, r1, RGN_DIFF);
    479479    // DeleteObject(r1);
    480     r1 := CreateRectRgn(ClientWidth - CaptionLeft,
     480    r1 := DpiCreateRectRgn(ClientWidth - CaptionLeft,
    481481      ClientHeight - (WideFrame - NarrowFrame), ClientWidth, ClientHeight);
    482482    CombineRgn(r0, r0, r1, RGN_DIFF);
  • branches/highdpi/Packages/CevoComponents/ButtonN.pas

    r178 r180  
    6262    if FGraphic <> nil then
    6363    begin
    64       BitBlt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,
     64      DpiBitBlt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,
    6565        1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176, SRCCOPY);
    6666      if FPossible then
    6767      begin
    68         BitBlt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,
     68        DpiBitBlt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,
    6969          195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCAND);
    70         BitBlt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,
     70        DpiBitBlt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,
    7171          195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT);
    7272      end
  • branches/highdpi/Packages/CevoComponents/EOTButton.pas

    r178 r180  
    3737procedure Register;
    3838
     39
    3940implementation
     41
    4042
    4143procedure Register;
     
    124126    begin
    125127      // TODO: For some reason BitBlt is not working with gray background here
    126       //BitBlt(Buffer.Canvas.Handle, 0, 0, 48, 48, Back.Canvas.Handle, 0,
     128      //DpiBitBlt(Buffer.Canvas.Handle, 0, 0, 48, 48, Back.Canvas.Handle, 0,
    127129      //  0, SRCCOPY);
    128130      Buffer.Canvas.Draw(0, 0, Back);
     
    132134        ImageOp_CBC(Buffer, Template, 8, 8, 1 + 32 * Byte(FIndex), 246, 32, 32,
    133135          $000000, $FFFFFF);
    134       BitBlt(Canvas.Handle, 0, 0, 48, 48, Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     136      DpiBitBlt(Canvas.Handle, 0, 0, 48, 48, Buffer.Canvas.Handle, 0, 0, SRCCOPY);
    135137    end
    136138    else
     
    164166procedure TEOTButton.SetBack(ca: TDpiCanvas; x, y: integer);
    165167begin
    166   BitBlt(Back.Canvas.Handle, 0, 0, 48, 48, ca.Handle, x, y, SRCCOPY);
     168  DpiBitBlt(Back.Canvas.Handle, 0, 0, 48, 48, ca.Handle, x, y, SRCCOPY);
    167169end;
    168170
  • branches/highdpi/Packages/CevoComponents/ScreenTools.pas

    r179 r180  
    569569    DataPixel.Init(GrExt[nGrExt].Data);
    570570    MaskPixel.Init(GrExt[nGrExt].Mask);
    571     for y := 0 to Source.Height - 1 do begin
    572       for x := 0 to xmax - 1 do begin
     571    for y := 0 to ScaleToVcl(Source.Height) - 1 do begin
     572      for x := 0 to ScaleToVcl(xmax) - 1 do begin
    573573        OriginalColor := DataPixel.Pixel^.ARGB and $FFFFFF;
    574574        if (OriginalColor = $FF00FF) or (OriginalColor = $7F007F) then
Note: See TracChangeset for help on using the changeset viewer.