Mantis - X-Force
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1953 | Allgemein | minor | always | 29.06.08 12:52 | 08.08.08 03:00 |
|
|||||
Reporter: | Natter | Platform: | |||
Assigned To: | Jim_Raynor | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | V0.915a02 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | V0.915a03 | ||
|
|||||
Summary: | 0001953: Zeichenfunktion Ellipse | ||||
Description: | Blending.pas benötigt eine Zeichenfunktion für Kreis/Ellipse. Benötigt wird das z.B. um die Reichweite von Granaten anzuzeigen. | ||||
Steps To Reproduce: | |||||
Additional Information: |
Beispiel für Linie: procedure HLine(Surface: TDirectDrawSurface;const Mem: TDDSurfaceDesc;FromX,ToX,Y: Integer;Col: TBlendColor); var Left,Right : Integer; Pixel : Integer; Length : Integer; i : Integer; begin if (Y < Surface.ClippingRect.Top) then exit; if (Y >= Surface.ClippingRect.Bottom) then exit; // Determine which is left and right by value if FromX=ToX then exit; if (FromX > ToX) then begin left := ToX; right := FromX + 1; end else begin left := FromX; right := ToX + 1; end; // Clip the line if (left < Surface.ClippingRect.left) then Left := Surface.ClippingRect.left; if (right > Surface.ClippingRect.right) then Right := Surface.ClippingRect.right; Length:=Right-Left; if Length<=0 then exit; Pixel:=Integer(Mem.lpSurface)+(Mem.lPitch*Y); if Mode32Bit then begin inc(Pixel,Left shl 2); repeat PInteger(Pixel)^ := Col; inc(Pixel,4); dec(Length); until (Length = 0); end else begin inc(Pixel,left shl 1); i := Length mod 2; dec(Length,i); while i > 0 do begin PWord(Pixel)^:=Col; inc(Pixel,2); dec(i); end; if (Length > 1) then begin Col := Col or (Col shl 16); repeat PInteger(Pixel)^:=Col; inc(Pixel,4); dec(Length,2); until (Length = 0); end; end; end; |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|