Changeset 206
- Timestamp:
- Mar 18, 2011, 9:34:42 AM (14 years ago)
- Location:
- GraphicTest
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/GraphicTest.lpi
r203 r206 39 39 </Item2> 40 40 </RequiredPackages> 41 <Units Count=" 27">41 <Units Count="36"> 42 42 <Unit0> 43 43 <Filename Value="GraphicTest.lpr"/> … … 47 47 <TopLine Value="1"/> 48 48 <CursorPos X="17" Y="3"/> 49 <UsageCount Value="3 2"/>49 <UsageCount Value="37"/> 50 50 </Unit0> 51 51 <Unit1> … … 57 57 <EditorIndex Value="0"/> 58 58 <WindowIndex Value="0"/> 59 <TopLine Value="1 "/>60 <CursorPos X="2 7" Y="38"/>61 <UsageCount Value="3 2"/>59 <TopLine Value="109"/> 60 <CursorPos X="23" Y="126"/> 61 <UsageCount Value="37"/> 62 62 <Loaded Value="True"/> 63 63 <LoadedDesigner Value="True"/> … … 69 69 <TopLine Value="1"/> 70 70 <CursorPos X="42" Y="22"/> 71 <UsageCount Value="1 8"/>71 <UsageCount Value="17"/> 72 72 </Unit2> 73 73 <Unit3> … … 75 75 <IsPartOfProject Value="True"/> 76 76 <UnitName Value="UPlatform"/> 77 <EditorIndex Value="1 1"/>77 <EditorIndex Value="16"/> 78 78 <WindowIndex Value="0"/> 79 79 <TopLine Value="43"/> 80 80 <CursorPos X="1" Y="1"/> 81 <UsageCount Value="3 2"/>81 <UsageCount Value="37"/> 82 82 <Loaded Value="True"/> 83 83 </Unit3> … … 88 88 <TopLine Value="244"/> 89 89 <CursorPos X="49" Y="262"/> 90 <UsageCount Value="1 2"/>90 <UsageCount Value="11"/> 91 91 </Unit4> 92 92 <Unit5> … … 96 96 <TopLine Value="121"/> 97 97 <CursorPos X="57" Y="142"/> 98 <UsageCount Value="1 2"/>98 <UsageCount Value="11"/> 99 99 </Unit5> 100 100 <Unit6> … … 103 103 <TopLine Value="85"/> 104 104 <CursorPos X="10" Y="102"/> 105 <UsageCount Value="1 2"/>105 <UsageCount Value="11"/> 106 106 </Unit6> 107 107 <Unit7> … … 110 110 <TopLine Value="153"/> 111 111 <CursorPos X="1" Y="160"/> 112 <UsageCount Value="1 2"/>112 <UsageCount Value="11"/> 113 113 </Unit7> 114 114 <Unit8> … … 118 118 <TopLine Value="1282"/> 119 119 <CursorPos X="15" Y="1299"/> 120 <UsageCount Value="1 2"/>120 <UsageCount Value="11"/> 121 121 </Unit8> 122 122 <Unit9> … … 125 125 <TopLine Value="546"/> 126 126 <CursorPos X="11" Y="553"/> 127 <UsageCount Value="1 2"/>127 <UsageCount Value="11"/> 128 128 </Unit9> 129 129 <Unit10> … … 132 132 <TopLine Value="389"/> 133 133 <CursorPos X="1" Y="411"/> 134 <UsageCount Value=" 9"/>134 <UsageCount Value="8"/> 135 135 </Unit10> 136 136 <Unit11> … … 139 139 <TopLine Value="444"/> 140 140 <CursorPos X="1" Y="461"/> 141 <UsageCount Value="1 2"/>141 <UsageCount Value="11"/> 142 142 </Unit11> 143 143 <Unit12> … … 146 146 <TopLine Value="14"/> 147 147 <CursorPos X="24" Y="21"/> 148 <UsageCount Value="1 2"/>148 <UsageCount Value="11"/> 149 149 </Unit12> 150 150 <Unit13> … … 153 153 <TopLine Value="313"/> 154 154 <CursorPos X="24" Y="316"/> 155 <UsageCount Value="1 2"/>155 <UsageCount Value="11"/> 156 156 </Unit13> 157 157 <Unit14> … … 160 160 <TopLine Value="149"/> 161 161 <CursorPos X="3" Y="151"/> 162 <UsageCount Value="1 2"/>162 <UsageCount Value="11"/> 163 163 </Unit14> 164 164 <Unit15> … … 168 168 <TopLine Value="171"/> 169 169 <CursorPos X="3" Y="188"/> 170 <UsageCount Value="1 1"/>170 <UsageCount Value="10"/> 171 171 </Unit15> 172 172 <Unit16> … … 175 175 <TopLine Value="300"/> 176 176 <CursorPos X="3" Y="317"/> 177 <UsageCount Value=" 9"/>177 <UsageCount Value="8"/> 178 178 </Unit16> 179 179 <Unit17> … … 182 182 <UnitName Value="UDrawMethod"/> 183 183 <IsVisibleTab Value="True"/> 184 <EditorIndex Value=" 6"/>185 <WindowIndex Value="0"/> 186 <TopLine Value="1 96"/>187 <CursorPos X=" 10" Y="206"/>188 <UsageCount Value=" 26"/>184 <EditorIndex Value="2"/> 185 <WindowIndex Value="0"/> 186 <TopLine Value="121"/> 187 <CursorPos X="3" Y="145"/> 188 <UsageCount Value="31"/> 189 189 <Loaded Value="True"/> 190 190 </Unit17> … … 193 193 <IsPartOfProject Value="True"/> 194 194 <UnitName Value="UFastBitmap"/> 195 <EditorIndex Value=" 5"/>196 <WindowIndex Value="0"/> 197 <TopLine Value=" 1"/>198 <CursorPos X=" 20" Y="20"/>199 <UsageCount Value=" 26"/>195 <EditorIndex Value="1"/> 196 <WindowIndex Value="0"/> 197 <TopLine Value="32"/> 198 <CursorPos X="41" Y="18"/> 199 <UsageCount Value="31"/> 200 200 <Loaded Value="True"/> 201 201 </Unit18> 202 202 <Unit19> 203 203 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/rasterimage.inc"/> 204 <EditorIndex Value=" 2"/>205 <WindowIndex Value="0"/> 206 <TopLine Value=" 504"/>207 <CursorPos X="1" Y=" 521"/>208 <UsageCount Value="1 2"/>204 <EditorIndex Value="8"/> 205 <WindowIndex Value="0"/> 206 <TopLine Value="292"/> 207 <CursorPos X="1" Y="308"/> 208 <UsageCount Value="14"/> 209 209 <Loaded Value="True"/> 210 210 </Unit19> … … 214 214 <EditorIndex Value="3"/> 215 215 <WindowIndex Value="0"/> 216 <TopLine Value="2 24"/>217 <CursorPos X=" 15" Y="237"/>218 <UsageCount Value="1 1"/>216 <TopLine Value="279"/> 217 <CursorPos X="57" Y="292"/> 218 <UsageCount Value="12"/> 219 219 <Loaded Value="True"/> 220 220 </Unit20> … … 222 222 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 223 223 <UnitName Value="BGRAWinBitmap"/> 224 <EditorIndex Value=" 4"/>225 <WindowIndex Value="0"/> 226 <TopLine Value="1 69"/>227 <CursorPos X="1" Y="1 90"/>228 <UsageCount Value="1 1"/>224 <EditorIndex Value="5"/> 225 <WindowIndex Value="0"/> 226 <TopLine Value="133"/> 227 <CursorPos X="1" Y="146"/> 228 <UsageCount Value="12"/> 229 229 <Loaded Value="True"/> 230 230 </Unit21> … … 232 232 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/extctrls.pp"/> 233 233 <UnitName Value="ExtCtrls"/> 234 <EditorIndex Value="1"/>235 234 <WindowIndex Value="0"/> 236 235 <TopLine Value="584"/> 237 236 <CursorPos X="3" Y="597"/> 238 237 <UsageCount Value="11"/> 239 <Loaded Value="True"/>240 238 </Unit22> 241 239 <Unit23> 242 240 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/winapih.inc"/> 243 <EditorIndex Value=" 9"/>241 <EditorIndex Value="14"/> 244 242 <WindowIndex Value="0"/> 245 243 <TopLine Value="32"/> 246 244 <CursorPos X="10" Y="45"/> 247 <UsageCount Value="1 0"/>245 <UsageCount Value="13"/> 248 246 <Loaded Value="True"/> 249 247 </Unit23> 250 248 <Unit24> 251 249 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/winapi.inc"/> 252 <EditorIndex Value="1 0"/>250 <EditorIndex Value="15"/> 253 251 <WindowIndex Value="0"/> 254 252 <TopLine Value="51"/> 255 253 <CursorPos X="3" Y="53"/> 256 <UsageCount Value="1 0"/>254 <UsageCount Value="13"/> 257 255 <Loaded Value="True"/> 258 256 </Unit24> … … 260 258 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphics.pp"/> 261 259 <UnitName Value="Graphics"/> 262 <EditorIndex Value=" 8"/>263 <WindowIndex Value="0"/> 264 <TopLine Value="1 081"/>265 <CursorPos X=" 15" Y="1094"/>266 <UsageCount Value="1 0"/>260 <EditorIndex Value="11"/> 261 <WindowIndex Value="0"/> 262 <TopLine Value="1314"/> 263 <CursorPos X="31" Y="1327"/> 264 <UsageCount Value="13"/> 267 265 <Loaded Value="True"/> 268 266 </Unit25> 269 267 <Unit26> 270 268 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/classes/classesh.inc"/> 271 <EditorIndex Value=" 7"/>269 <EditorIndex Value="10"/> 272 270 <WindowIndex Value="0"/> 273 271 <TopLine Value="1883"/> 274 272 <CursorPos X="10" Y="1896"/> 273 <UsageCount Value="13"/> 274 <Loaded Value="True"/> 275 </Unit26> 276 <Unit27> 277 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/inc/heaph.inc"/> 278 <WindowIndex Value="0"/> 279 <TopLine Value="75"/> 280 <CursorPos X="31" Y="88"/> 281 <UsageCount Value="11"/> 282 </Unit27> 283 <Unit28> 284 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/inc/heap.inc"/> 285 <WindowIndex Value="0"/> 286 <TopLine Value="309"/> 287 <CursorPos X="3" Y="311"/> 275 288 <UsageCount Value="10"/> 276 <Loaded Value="True"/> 277 </Unit26> 289 </Unit28> 290 <Unit29> 291 <Filename Value="bgrabitmap/bgrabitmaptypes.pas"/> 292 <UnitName Value="BGRABitmapTypes"/> 293 <EditorIndex Value="9"/> 294 <WindowIndex Value="0"/> 295 <TopLine Value="24"/> 296 <CursorPos X="3" Y="37"/> 297 <UsageCount Value="12"/> 298 <Loaded Value="True"/> 299 </Unit29> 300 <Unit30> 301 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 302 <UnitName Value="GraphType"/> 303 <EditorIndex Value="7"/> 304 <WindowIndex Value="0"/> 305 <TopLine Value="271"/> 306 <CursorPos X="23" Y="292"/> 307 <UsageCount Value="11"/> 308 <Loaded Value="True"/> 309 </Unit30> 310 <Unit31> 311 <Filename Value="UBitmaps.pas"/> 312 <UnitName Value="UBitmaps"/> 313 <WindowIndex Value="0"/> 314 <TopLine Value="1"/> 315 <CursorPos X="41" Y="62"/> 316 <UsageCount Value="20"/> 317 </Unit31> 318 <Unit32> 319 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/packages/fcl-image/src/fpimage.pp"/> 320 <UnitName Value="FPimage"/> 321 <EditorIndex Value="13"/> 322 <WindowIndex Value="0"/> 323 <TopLine Value="23"/> 324 <CursorPos X="4" Y="35"/> 325 <UsageCount Value="10"/> 326 <Loaded Value="True"/> 327 </Unit32> 328 <Unit33> 329 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/canvas.inc"/> 330 <EditorIndex Value="12"/> 331 <WindowIndex Value="0"/> 332 <TopLine Value="1456"/> 333 <CursorPos X="1" Y="1471"/> 334 <UsageCount Value="10"/> 335 <Loaded Value="True"/> 336 </Unit33> 337 <Unit34> 338 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/win/wininc/func.inc"/> 339 <EditorIndex Value="6"/> 340 <WindowIndex Value="0"/> 341 <TopLine Value="780"/> 342 <CursorPos X="10" Y="793"/> 343 <UsageCount Value="10"/> 344 <Loaded Value="True"/> 345 </Unit34> 346 <Unit35> 347 <Filename Value="bgrabitmap/bgrablend.pas"/> 348 <UnitName Value="BGRABlend"/> 349 <EditorIndex Value="4"/> 350 <WindowIndex Value="0"/> 351 <TopLine Value="217"/> 352 <CursorPos X="3" Y="219"/> 353 <UsageCount Value="10"/> 354 <Loaded Value="True"/> 355 </Unit35> 278 356 </Units> 279 <JumpHistory Count=" 29" HistoryIndex="28">357 <JumpHistory Count="30" HistoryIndex="26"> 280 358 <Position1> 281 <Filename Value="bgrabitmap/bgra winbitmap.pas"/>282 <Caret Line=" 177" Column="1" TopLine="165"/>359 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 360 <Caret Line="3492" Column="1" TopLine="3479"/> 283 361 </Position1> 284 362 <Position2> 285 <Filename Value="bgrabitmap/bgra winbitmap.pas"/>286 <Caret Line=" 179" Column="1" TopLine="165"/>363 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 364 <Caret Line="3493" Column="1" TopLine="3479"/> 287 365 </Position2> 288 366 <Position3> 289 <Filename Value="bgrabitmap/bgra winbitmap.pas"/>290 <Caret Line="1 80" Column="1" TopLine="165"/>367 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 368 <Caret Line="1061" Column="1" TopLine="1048"/> 291 369 </Position3> 292 370 <Position4> 293 371 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 294 <Caret Line="1 81" Column="1" TopLine="168"/>372 <Caret Line="135" Column="20" TopLine="119"/> 295 373 </Position4> 296 374 <Position5> 297 375 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 298 <Caret Line="1 83" Column="1" TopLine="168"/>376 <Caret Line="127" Column="1" TopLine="119"/> 299 377 </Position5> 300 378 <Position6> 301 379 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 302 <Caret Line="1 87" Column="1" TopLine="168"/>380 <Caret Line="128" Column="1" TopLine="119"/> 303 381 </Position6> 304 382 <Position7> 305 383 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 306 <Caret Line="1 89" Column="1" TopLine="168"/>384 <Caret Line="135" Column="1" TopLine="119"/> 307 385 </Position7> 308 386 <Position8> 309 <Filename Value="bgrabitmap/bgra defaultbitmap.pas"/>310 <Caret Line=" 809" Column="1" TopLine="796"/>387 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 388 <Caret Line="136" Column="1" TopLine="128"/> 311 389 </Position8> 312 390 <Position9> 313 <Filename Value="bgrabitmap/bgra defaultbitmap.pas"/>314 <Caret Line=" 810" Column="1" TopLine="796"/>391 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 392 <Caret Line="137" Column="1" TopLine="128"/> 315 393 </Position9> 316 394 <Position10> 317 <Filename Value=" bgrabitmap/bgrawinbitmap.pas"/>318 <Caret Line="1 90" Column="1" TopLine="169"/>395 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/canvas.inc"/> 396 <Caret Line="1469" Column="1" TopLine="1456"/> 319 397 </Position10> 320 398 <Position11> 321 <Filename Value=" bgrabitmap/bgradefaultbitmap.pas"/>322 <Caret Line=" 503" Column="1" TopLine="490"/>399 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/canvas.inc"/> 400 <Caret Line="1470" Column="1" TopLine="1456"/> 323 401 </Position11> 324 402 <Position12> 325 <Filename Value=" UDrawMethod.pas"/>326 <Caret Line="1 02" Column="1" TopLine="96"/>403 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/canvas.inc"/> 404 <Caret Line="1471" Column="1" TopLine="1456"/> 327 405 </Position12> 328 406 <Position13> 329 <Filename Value=" UDrawMethod.pas"/>330 <Caret Line="13 3" Column="25" TopLine="111"/>407 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 408 <Caret Line="136" Column="12" TopLine="128"/> 331 409 </Position13> 332 410 <Position14> 333 <Filename Value=" UDrawMethod.pas"/>334 <Caret Line="13 4" Column="16" TopLine="111"/>411 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 412 <Caret Line="137" Column="7" TopLine="113"/> 335 413 </Position14> 336 414 <Position15> 337 <Filename Value=" UMainForm.pas"/>338 <Caret Line=" 78" Column="50" TopLine="67"/>415 <Filename Value="bgrabitmap/bgrawinbitmap.pas"/> 416 <Caret Line="146" Column="1" TopLine="133"/> 339 417 </Position15> 340 418 <Position16> 341 <Filename Value=" UDrawMethod.pas"/>342 <Caret Line=" 8" Column="32" TopLine="3"/>419 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 420 <Caret Line="1069" Column="1" TopLine="1048"/> 343 421 </Position16> 344 422 <Position17> 345 <Filename Value=" UMainForm.pas"/>346 <Caret Line=" 8" Column="20" TopLine="1"/>423 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 424 <Caret Line="1055" Column="25" TopLine="1048"/> 347 425 </Position17> 348 426 <Position18> 349 <Filename Value=" UMainForm.pas"/>350 <Caret Line=" 33" Column="19" TopLine="12"/>427 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 428 <Caret Line="215" Column="27" TopLine="202"/> 351 429 </Position18> 352 430 <Position19> 353 <Filename Value=" UDrawMethod.pas"/>354 <Caret Line=" 8" Column="42" TopLine="1"/>431 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 432 <Caret Line="299" Column="31" TopLine="281"/> 355 433 </Position19> 356 434 <Position20> 357 <Filename Value=" UDrawMethod.pas"/>358 <Caret Line="29 " Column="39" TopLine="14"/>435 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 436 <Caret Line="290" Column="39" TopLine="287"/> 359 437 </Position20> 360 438 <Position21> 361 439 <Filename Value="UDrawMethod.pas"/> 362 <Caret Line="1 38" Column="5" TopLine="120"/>440 <Caret Line="146" Column="19" TopLine="133"/> 363 441 </Position21> 364 442 <Position22> 365 <Filename Value=" UDrawMethod.pas"/>366 <Caret Line="1 73" Column="23" TopLine="157"/>443 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphics.pp"/> 444 <Caret Line="1327" Column="31" TopLine="1314"/> 367 445 </Position22> 368 446 <Position23> 369 <Filename Value=" UDrawMethod.pas"/>370 <Caret Line="1 58" Column="12" TopLine="155"/>447 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 448 <Caret Line="189" Column="25" TopLine="187"/> 371 449 </Position23> 372 450 <Position24> 373 <Filename Value=" UDrawMethod.pas"/>374 <Caret Line=" 28" Column="34" TopLine="14"/>451 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 452 <Caret Line="5" Column="65" TopLine="1"/> 375 453 </Position24> 376 454 <Position25> 377 <Filename Value=" UDrawMethod.pas"/>378 <Caret Line=" 177" Column="48" TopLine="155"/>455 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 456 <Caret Line="274" Column="23" TopLine="253"/> 379 457 </Position25> 380 458 <Position26> 381 <Filename Value=" UDrawMethod.pas"/>382 <Caret Line=" 316" Column="26" TopLine="305"/>459 <Filename Value="../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 460 <Caret Line="289" Column="26" TopLine="268"/> 383 461 </Position26> 384 462 <Position27> 385 463 <Filename Value="UDrawMethod.pas"/> 386 <Caret Line=" 329" Column="3" TopLine="327"/>464 <Caret Line="133" Column="33" TopLine="121"/> 387 465 </Position27> 388 466 <Position28> 389 <Filename Value=" UDrawMethod.pas"/>390 <Caret Line=" 178" Column="29" TopLine="164"/>467 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 468 <Caret Line="292" Column="57" TopLine="279"/> 391 469 </Position28> 392 470 <Position29> 393 <Filename Value=" UDrawMethod.pas"/>394 <Caret Line=" 211" Column="28" TopLine="196"/>471 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 472 <Caret Line="420" Column="26" TopLine="413"/> 395 473 </Position29> 474 <Position30> 475 <Filename Value="bgrabitmap/bgradefaultbitmap.pas"/> 476 <Caret Line="407" Column="3" TopLine="405"/> 477 </Position30> 396 478 </JumpHistory> 397 479 </ProjectOptions> -
GraphicTest/GraphicTest.lpr
r201 r206 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm, UPlatform, UDrawMethod, UFastBitmap 11 { you can add units after this }; 10 Forms, UMainForm, UPlatform, UDrawMethod, UFastBitmap; 12 11 13 12 {$R *.res} -
GraphicTest/UDrawMethod.pas
r203 r206 11 11 12 12 type 13 TPaintObject = (poImage, poPaintBox, poOpenGL); 13 14 14 15 { TDrawMethod } … … 25 26 Terminated: Boolean; 26 27 FrameDuration: TDateTime; 28 PaintObject: TPaintObject; 27 29 constructor Create; virtual; 28 30 destructor Destroy; override; … … 113 115 Caption := 'TBGRABitmap PaintBox'; 114 116 BGRABitmap := TBGRABitmap.Create(0, 0); 117 PaintObject := poPaintBox; 115 118 end; 116 119 … … 124 127 var 125 128 X, Y: Integer; 126 P: P BGRAPixel;129 P: PInteger; 127 130 begin 128 131 with FastBitmap do 129 132 for Y := 0 to Size.Y - 1 do begin 130 P := BGRABitmap.ScanLine[Y];133 P := PInteger(BGRABitmap.ScanLine[Y]); 131 134 for X := 0 to Size.X - 1 do begin 132 P^.red := Pixels[X, Y]; 135 P^ := NoSwapBRComponent(Pixels[X, Y]); 136 (*P^.red := Pixels[X, Y]; 133 137 P^.green := Pixels[X, Y]; 134 138 P^.blue := Pixels[X, Y]; 135 P^.alpha := 255; 139 P^.alpha := 255; *) 136 140 Inc(P); 137 141 end; 138 142 end; 139 BGRABitmap.InvalidateBitmap; // changed by direct access140 //BGRABitmap.Draw(Bitmap.Canvas, 0, 0, False);143 //BGRABitmap.InvalidateBitmap; // changed by direct access 144 //BGRABitmap.Draw(Bitmap.Canvas, 0, 0, True); 141 145 BGRABitmap.Draw(PaintBox.Canvas, 0, 0, True); 146 // Bitmap.RawImage.Ass 142 147 end; 143 148 … … 148 153 inherited; 149 154 Caption := 'TBitmap.RawImage.Data PaintBox'; 155 PaintObject := poPaintBox; 150 156 end; 151 157 … … 154 160 Y, X: Integer; 155 161 PixelPtr: PInteger; 162 RowPtr: PInteger; 156 163 P: TPixelFormat; 157 164 RawImage: TRawImage; 158 165 BytePerPixel: Integer; 166 BytePerRow: Integer; 159 167 hPaint, hBmp: HDC; 160 168 begin … … 164 172 TempBitmap.BeginUpdate(False); 165 173 RawImage := TempBitmap.RawImage; 166 PixelPtr := PInteger(RawImage.Data);174 RowPtr := PInteger(RawImage.Data); 167 175 BytePerPixel := RawImage.Description.BitsPerPixel div 8; 168 for X := 0 to Size.X - 1 do 169 for Y := 0 to Size.Y - 1 do begin 170 PixelPtr^ := Pixels[X, Y] * $010101; 176 BytePerRow := RawImage.Description.BytesPerLine; 177 for Y := 0 to Size.Y - 1 do begin 178 PixelPtr := RowPtr; 179 for X := 0 to Size.X - 1 do begin 180 PixelPtr^ := Pixels[X, Y]; 171 181 Inc(PByte(PixelPtr), BytePerPixel); 172 182 end; 183 Inc(PByte(RowPtr), BytePerRow); 184 end; 173 185 finally 174 186 TempBitmap.EndUpdate(False); … … 190 202 191 203 procedure TBitmapRawImageData.DrawFrame(FastBitmap: TFastBitmap); 204 type 205 TFastBitmapPixelComponents = packed record 206 end; 192 207 var 193 208 Y, X: Integer; … … 210 225 PixelPtr := RowPtr; 211 226 for X := 0 to Size.X - 1 do begin 212 PixelPtr^ := Pixels[X, Y] * $010101;227 PixelPtr^ := Pixels[X, Y]; 213 228 Inc(PByte(PixelPtr), BytePerPixel); 214 229 end; … … 248 263 for X := 0 to Size.X - 1 do 249 264 for Y := 0 to Size.Y - 1 do 250 TempIntfImage.Colors[X, Y] := TColorToFPColor( Pixels[X, Y] * $010101);265 TempIntfImage.Colors[X, Y] := TColorToFPColor(SwapBRComponent(Pixels[X, Y])); 251 266 Bitmap.LoadFromIntfImage(TempIntfImage); 252 267 end; … … 277 292 for X := 0 to Size.X - 1 do 278 293 for Y := 0 to Size.Y - 1 do 279 TempIntfImage.Colors[X, Y] := TColorToFPColor( Pixels[X, Y] * $010101);294 TempIntfImage.Colors[X, Y] := TColorToFPColor(SwapBRComponent(Pixels[X, Y])); 280 295 Bitmap.LoadFromIntfImage(TempIntfImage); 281 296 end; … … 299 314 for X := 0 to Size.X - 1 do 300 315 for Y := 0 to Size.Y - 1 do 301 Bitmap.Canvas.Pixels[X, Y] := Pixels[X, Y] * $010101;316 Bitmap.Canvas.Pixels[X, Y] := SwapBRComponent(Pixels[X, Y]); 302 317 finally 303 318 Bitmap.EndUpdate(False); … … 320 335 for X := 0 to Size.X - 1 do 321 336 for Y := 0 to Size.Y - 1 do 322 Bitmap.Canvas.Pixels[X, Y] := Pixels[X, Y] * $010101;337 Bitmap.Canvas.Pixels[X, Y] := SwapBRComponent(Pixels[X, Y]); 323 338 end; 324 339 end; -
GraphicTest/UFastBitmap.pas
r201 r206 6 6 7 7 uses 8 Classes, SysUtils ;8 Classes, SysUtils, Dialogs; 9 9 10 10 type 11 TFastBitmapPixel = Integer; 12 PFastBitmapPixel = ^TFastBitmapPixel; 13 14 TFastBitmapPixelComponents = packed record 15 B, G, R, A: Byte; 16 end; 17 11 18 { TFastBitmap } 12 19 13 20 TFastBitmap = class 14 21 private 22 FPixelsData: PByte; 23 FSize: TPoint; 24 function GetPixel(X, Y: Integer): TFastBitmapPixel; inline; 25 procedure SetPixel(X, Y: Integer; const AValue: TFastBitmapPixel); inline; 26 procedure SetSize(const AValue: TPoint); 27 public 28 constructor Create; 29 destructor Destroy; override; 30 procedure RandomImage; 31 property Size: TPoint read FSize write SetSize; 32 property Pixels[X, Y: Integer]: TFastBitmapPixel read GetPixel write SetPixel; 33 end; 34 35 TFastBitmap2 = class 36 private 15 37 function GetSize: TPoint; 16 38 procedure SetSize(const AValue: TPoint); 17 39 public 18 Pixels: array of array of Byte;40 Pixels: array of array of TFastBitmapPixel; 19 41 procedure RandomImage; 20 42 property Size: TPoint read GetSize write SetSize; 21 43 end; 22 44 45 function SwapBRComponent(Value: Integer): Integer; inline; 46 function NoSwapBRComponent(Value: Integer): Integer; inline; 47 23 48 implementation 24 49 25 { TFastBitmap } 50 function SwapBRComponent(Value: Integer): Integer; 51 begin 52 // Result := (Value and $00ff00) or ((Value shr 16) and $ff) or ((Value and $ff) shl 16); 53 Result := Value; 54 TFastBitmapPixelComponents(Result).R := TFastBitmapPixelComponents(Value).B; 55 TFastBitmapPixelComponents(Result).B := TFastBitmapPixelComponents(Value).R; 56 end; 26 57 27 function TFastBitmap.GetSize: TPoint; 58 function NoSwapBRComponent(Value: Integer): Integer; 59 begin 60 // Result := (Value and $00ff00) or ((Value shr 16) and $ff) or ((Value and $ff) shl 16); 61 Result := Value; 62 TFastBitmapPixelComponents(Result).B := TFastBitmapPixelComponents(Value).B; 63 TFastBitmapPixelComponents(Result).R := TFastBitmapPixelComponents(Value).R; 64 end; 65 66 { TFastBitmap2 } 67 68 function TFastBitmap2.GetSize: TPoint; 28 69 begin 29 70 Result.X := Length(Pixels); … … 32 73 end; 33 74 34 procedure TFastBitmap .SetSize(const AValue: TPoint);75 procedure TFastBitmap2.SetSize(const AValue: TPoint); 35 76 begin 36 77 SetLength(Pixels, AValue.X, AValue.Y); 37 78 end; 38 79 39 procedure TFastBitmap .RandomImage;80 procedure TFastBitmap2.RandomImage; 40 81 var 41 82 X, Y: Integer; … … 46 87 end; 47 88 89 { TFastBitmap } 90 91 function TFastBitmap.GetPixel(X, Y: Integer): TFastBitmapPixel; 92 begin 93 Result := PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * SizeOf(TFastBitmapPixel))^; 94 end; 95 96 procedure TFastBitmap.SetPixel(X, Y: Integer; const AValue: TFastBitmapPixel); 97 begin 98 PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * SizeOf(TFastBitmapPixel))^ := AValue; 99 end; 100 101 procedure TFastBitmap.SetSize(const AValue: TPoint); 102 begin 103 if (FSize.X = AValue.X) and (FSize.Y = AValue.X) then Exit; 104 FSize := AValue; 105 FPixelsData := ReAllocMem(FPixelsData, FSize.X * FSize.Y * SizeOf(TFastBitmapPixel)); 106 end; 107 108 constructor TFastBitmap.Create; 109 begin 110 Size := Point(0, 0); 111 end; 112 113 destructor TFastBitmap.Destroy; 114 begin 115 FreeMem(FPixelsData); 116 inherited Destroy; 117 end; 118 119 procedure TFastBitmap.RandomImage; 120 var 121 I, X, Y: Integer; 122 begin 123 for I := 0 to 2 do 124 for Y := 0 to (Size.Y div 2) - 1 do 125 for X := 0 to (Size.X div 3) - 1 do 126 Pixels[X + (I * (Size.X div 3)), Y] := 255 shl (I * 8); 127 128 for Y := (Size.Y div 2) to Size.Y - 1 do 129 for X := 0 to Size.X - 1 do 130 Pixels[X, Y] := Random(256) or (Random(256) shl 16) or (Random(256) shl 8); 131 end; 132 48 133 49 134 end. -
GraphicTest/UMainForm.lfm
r202 r206 1 1 object MainForm: TMainForm 2 2 Left = 214 3 Height = 4523 Height = 338 4 4 Top = 106 5 Width = 7315 Width = 680 6 6 Caption = 'Graphic test' 7 ClientHeight = 4528 ClientWidth = 7317 ClientHeight = 338 8 ClientWidth = 680 9 9 OnClose = FormClose 10 10 OnCreate = FormCreate … … 13 13 object PageControl1: TPageControl 14 14 Left = 312 15 Height = 43215 Height = 318 16 16 Top = 16 17 Width = 41617 Width = 365 18 18 ActivePage = TabSheet1 19 19 Anchors = [akTop, akLeft, akRight, akBottom] … … 22 22 object TabSheet1: TTabSheet 23 23 Caption = 'TImage' 24 ClientHeight = 40625 ClientWidth = 40824 ClientHeight = 292 25 ClientWidth = 357 26 26 object Image1: TImage 27 27 Left = 6 28 Height = 39328 Height = 279 29 29 Top = 7 30 Width = 3 9830 Width = 347 31 31 Anchors = [akTop, akLeft, akRight, akBottom] 32 32 end 33 33 end 34 34 object TabSheet2: TTabSheet 35 Caption = ' Direct Canvas'36 ClientHeight = 40 537 ClientWidth = 37235 Caption = 'TPaintBox' 36 ClientHeight = 406 37 ClientWidth = 408 38 38 object PaintBox1: TPaintBox 39 39 Left = 6 40 Height = 39 340 Height = 394 41 41 Top = 7 42 Width = 3 6142 Width = 397 43 43 Anchors = [akTop, akLeft, akRight, akBottom] 44 44 end … … 98 98 object ListView1: TListView 99 99 Left = 8 100 Height = 240101 Top = 208100 Height = 166 101 Top = 168 102 102 Width = 296 103 103 Anchors = [akTop, akLeft, akBottom] … … 105 105 item 106 106 Caption = 'Method' 107 Width = 1 00107 Width = 140 108 108 end 109 109 item … … 119 119 end 120 120 object ButtonBenchmark: TButton 121 Left = 11121 Left = 9 122 122 Height = 25 123 Top = 1 76123 Top = 136 124 124 Width = 75 125 125 Caption = 'Benchmark' -
GraphicTest/UMainForm.pas
r202 r206 98 98 if ComboBox1.ItemIndex >= 0 then 99 99 with TDrawMethod(DrawMethods[ComboBox1.ItemIndex]) do begin 100 PageControl1.TabIndex := Integer(PaintObject); 101 Application.ProcessMessages; 100 102 repeat 101 103 DrawFrameTiming(TFastBitmap(Scenes[SceneIndex])); … … 118 120 for I := 0 to DrawMethods.Count - 1 do 119 121 with TDrawMethod(DrawMethods[I]) do begin 122 PageControl1.TabIndex := Integer(PaintObject); 123 Application.ProcessMessages; 120 124 DrawFrameTiming(TFastBitmap(Scenes[0])); 125 Application.ProcessMessages; 121 126 DrawFrameTiming(TFastBitmap(Scenes[0])); 122 127 NewItem := Add;
Note:
See TracChangeset
for help on using the changeset viewer.