Changeset 180
- Timestamp:
- Jun 23, 2019, 11:57:39 PM (6 years ago)
- Location:
- branches/highdpi
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Integrated.lpi
r178 r180 99 99 </Item3> 100 100 </RequiredPackages> 101 <Units Count="4 1">101 <Units Count="40"> 102 102 <Unit0> 103 103 <Filename Value="Integrated.lpr"/> … … 207 207 </Unit20> 208 208 <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"/> 211 214 </Unit21> 212 215 <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"/> 216 219 <HasResources Value="True"/> 217 220 <ResourceBaseClass Value="Form"/> 218 221 </Unit22> 219 222 <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"/> 223 226 <HasResources Value="True"/> 224 227 <ResourceBaseClass Value="Form"/> 225 228 </Unit23> 226 229 <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"/> 230 233 <HasResources Value="True"/> 231 234 <ResourceBaseClass Value="Form"/> 232 235 </Unit24> 233 236 <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"/> 237 240 <HasResources Value="True"/> 238 241 <ResourceBaseClass Value="Form"/> 239 242 </Unit25> 240 243 <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"/> 244 247 <HasResources Value="True"/> 245 248 <ResourceBaseClass Value="Form"/> 246 249 </Unit26> 247 250 <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"/> 251 254 <HasResources Value="True"/> 252 255 <ResourceBaseClass Value="Form"/> 253 256 </Unit27> 254 257 <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"/> 258 261 <HasResources Value="True"/> 259 262 <ResourceBaseClass Value="Form"/> 260 263 </Unit28> 261 264 <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"/> 265 268 <HasResources Value="True"/> 266 269 <ResourceBaseClass Value="Form"/> 267 270 </Unit29> 268 271 <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"/> 272 275 <HasResources Value="True"/> 273 276 <ResourceBaseClass Value="Form"/> 274 277 </Unit30> 275 278 <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"/> 279 282 <HasResources Value="True"/> 280 283 <ResourceBaseClass Value="Form"/> 281 284 </Unit31> 282 285 <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"/> 286 289 <HasResources Value="True"/> 287 290 <ResourceBaseClass Value="Form"/> 288 291 </Unit32> 289 292 <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"/> 293 296 <HasResources Value="True"/> 294 297 <ResourceBaseClass Value="Form"/> 295 298 </Unit33> 296 299 <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"/> 300 303 <HasResources Value="True"/> 301 304 <ResourceBaseClass Value="Form"/> 302 305 </Unit34> 303 306 <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"/> 307 310 <HasResources Value="True"/> 308 311 <ResourceBaseClass Value="Form"/> 309 312 </Unit35> 310 313 <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"/> 316 316 </Unit36> 317 317 <Unit37> 318 <Filename Value=" Platform.pas"/>318 <Filename Value="Switches.inc"/> 319 319 <IsPartOfProject Value="True"/> 320 320 </Unit37> 321 321 <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"/> 324 326 </Unit38> 325 327 <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"/> 330 330 </Unit39> 331 <Unit40>332 <Filename Value="IPQ.pas"/>333 <IsPartOfProject Value="True"/>334 </Unit40>335 331 </Units> 336 332 </ProjectOptions> -
branches/highdpi/Integrated.lpr
r178 r180 24 24 Term in 'LocalPlayer\Term.pas' {MainScreen} , 25 25 MessgEx in 'LocalPlayer\MessgEx.pas' {MessgExDlg} , 26 BaseWin in 'LocalPlayer\BaseWin.pas',27 26 Help in 'LocalPlayer\Help.pas' {HelpDlg} , 28 27 Select in 'LocalPlayer\Select.pas' {ListDlg} , -
branches/highdpi/Packages/CevoComponents/BaseWin.pas
r178 r180 165 165 procedure TBufferedDrawDlg.VPaint; 166 166 begin 167 BitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight,167 DpiBitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight, 168 168 Offscreen.Canvas.Handle, 0, 0, SRCCOPY); 169 169 end; … … 278 278 else 279 279 BottomFrame := NarrowFrame; 280 r0 := CreateRectRgn(SideFrame, TitleHeight, ClientWidth - SideFrame,280 r0 := DpiCreateRectRgn(SideFrame, TitleHeight, ClientWidth - SideFrame, 281 281 ClientHeight - BottomFrame); 282 282 for i := 0 to ControlCount - 1 do … … 284 284 begin 285 285 with Controls[i].BoundsRect do 286 r1 := CreateRectRgn(Left, Top, Right, Bottom);286 r1 := DpiCreateRectRgn(Left, Top, Right, Bottom); 287 287 CombineRgn(r0, r0, r1, RGN_DIFF); 288 288 DeleteObject(r1); … … 454 454 end; 455 455 456 BitBlt(Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,456 DpiBitBlt(Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame, 457 457 InnerBottom - TitleHeight, Offscreen.Canvas.Handle, 0, 0, SRCCOPY); 458 458 end; … … 464 464 if FullCaption then 465 465 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); 468 468 CombineRgn(r0, r0, r1, RGN_DIFF); 469 469 // DeleteObject(r1); 470 r1 := CreateRectRgn(ClientWidth - CaptionLeft, 0, ClientWidth,470 r1 := DpiCreateRectRgn(ClientWidth - CaptionLeft, 0, ClientWidth, 471 471 TitleHeight - NarrowFrame); 472 472 CombineRgn(r0, r0, r1, RGN_DIFF); … … 474 474 if WideBottom then 475 475 begin 476 r1 := CreateRectRgn(0, ClientHeight - (WideFrame - NarrowFrame),476 r1 := DpiCreateRectRgn(0, ClientHeight - (WideFrame - NarrowFrame), 477 477 CaptionLeft, ClientHeight); 478 478 CombineRgn(r0, r0, r1, RGN_DIFF); 479 479 // DeleteObject(r1); 480 r1 := CreateRectRgn(ClientWidth - CaptionLeft,480 r1 := DpiCreateRectRgn(ClientWidth - CaptionLeft, 481 481 ClientHeight - (WideFrame - NarrowFrame), ClientWidth, ClientHeight); 482 482 CombineRgn(r0, r0, r1, RGN_DIFF); -
branches/highdpi/Packages/CevoComponents/ButtonN.pas
r178 r180 62 62 if FGraphic <> nil then 63 63 begin 64 BitBlt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,64 DpiBitBlt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle, 65 65 1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176, SRCCOPY); 66 66 if FPossible then 67 67 begin 68 BitBlt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,68 DpiBitBlt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle, 69 69 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, 71 71 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT); 72 72 end -
branches/highdpi/Packages/CevoComponents/EOTButton.pas
r178 r180 37 37 procedure Register; 38 38 39 39 40 implementation 41 40 42 41 43 procedure Register; … … 124 126 begin 125 127 // 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, 127 129 // 0, SRCCOPY); 128 130 Buffer.Canvas.Draw(0, 0, Back); … … 132 134 ImageOp_CBC(Buffer, Template, 8, 8, 1 + 32 * Byte(FIndex), 246, 32, 32, 133 135 $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); 135 137 end 136 138 else … … 164 166 procedure TEOTButton.SetBack(ca: TDpiCanvas; x, y: integer); 165 167 begin 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); 167 169 end; 168 170 -
branches/highdpi/Packages/CevoComponents/ScreenTools.pas
r179 r180 569 569 DataPixel.Init(GrExt[nGrExt].Data); 570 570 MaskPixel.Init(GrExt[nGrExt].Mask); 571 for y := 0 to S ource.Height- 1 do begin572 for x := 0 to xmax- 1 do begin571 for y := 0 to ScaleToVcl(Source.Height) - 1 do begin 572 for x := 0 to ScaleToVcl(xmax) - 1 do begin 573 573 OriginalColor := DataPixel.Pixel^.ARGB and $FFFFFF; 574 574 if (OriginalColor = $FF00FF) or (OriginalColor = $7F007F) then
Note:
See TracChangeset
for help on using the changeset viewer.