GithubHelp home page GithubHelp logo

aggpasmod's Introduction

Modernized Pascal Anti-Grain Geometry

Anti-Grain Geometry (modernized Pascal fork, aka 'AggPasMod')

Based on:

Based on:

  • Anti-Grain Geometry (AGG) ver 2.4
  • by Maxim Shemanarev
  • High Fidelity 2D Graphics, High Quality Rendering Engine for C++
  • Copyright © 2002-2006
  • http://www.antigrain.com

AggPasMod

Based on AggPas, which is itself based on the Anti-Grain Geometry, this project offers support for the latest Delphi Versions (XE and above) and contains some helper classes (VCL components and FireMonkey interface).

Initially, the AggPas port had been modernized only to see how it compares performance wise. However, after many weeks of work and several improvments (assembler optimizations, better code readability, some helper classes), it was decided to release this modernized version of the AggPas port independently.

The project was hosted on SourceForge and has been moved to GitHub.

Installation

Once the project has been checked out or downloaded, it can be installed in the IDE by installing the runtime and the design-time packages for the given Delphi/Lazarus version. However, before that some directories must be known by the IDE. Please specify these manually until the packages compile.

Alternatively the packages can be obtained and installed via GetIt (XE8).

Recently Delphinus-Support has also been added to support older Delphi versions (see https://github.com/Memnarch/Delphinus for more information).

License

The (modernized) port is licensed under the same terms as the original library:

Anti-Grain Geometry - Version 2.4 (Public License) Copyright (C) 2002-2005 Maxim Shemanarev (http:www.antigrain.com) Contact: [email protected] / [email protected]

Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears in all copies. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.

aggpasmod's People

Contributors

bverhue avatar cwbudde avatar errorcalc avatar kant avatar kjkang106 avatar tangentstorm avatar x2nie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aggpasmod's Issues

Div by zero in AggMathStroke.StrokeCalcCap

Had a case during some testing where StrokeCalcCap got called with Len = 0. This if course caused a division by zero crash on Da := 1 / Len.

As a hack fix, I just added a test to exit the procedure if Len is 0, but I am not sure what the implications of this are.

Compile problem FPC/Lazarus in unit AggFontWin32TrueType.pas

Hi Christian,

I found a problem in unit AggFontWin32TrueType that gives a compile error in FPC/Lazarus. Following changes solve the problem:

Line 792, FPC/Lazarus expects a pointer

  {$IFDEF FPC}
  FTextMetricValid := GetTextMetricsA(FDc, @FTextMetric);
  {$ELSE}
  FTextMetricValid := GetTextMetricsA(FDc, FTextMetric);
  {$ENDIF}   

Line 856 same:

    {$IFDEF FPC}
    FTextMetricValid := GetTextMetricsA(FDc, @FTextMetric);
    {$ELSE}
    FTextMetricValid := GetTextMetricsA(FDc, FTextMetric);
    {$ENDIF} 

Bug alpha calculation in AggPixelFormatBgra32Pre.inc BlendPixBgraPre asm

Hi, there is a small bug in the asm:

//MOVZX   EDX, [EDI] should be:
MOVZX   EDX, [EDI +$3]
SUB     EAX, EDX
IMUL    EAX, EBX
SHR     EAX, $08
MOV     EDX, CAggBaseMask
SUB     EDX, EAX
MOV     [EDI + $3], DL

and
//MOVZX EDX, [RCX]
MOVZX EDX, [RCX +$3]
SUB EAX, EDX
IMUL EAX, R10
SHR EAX, $08
MOV EDX, CAggBaseMask
SUB EDX, EAX
MOV [RCX + $3], DL

By the way, since I want to use the library in some of my projects, I would like to contribute. I found some issues with the freetype implementation also and some other things.

Regards
Bruno

TAgg2DControl.AssignTo doesn't work in Free Pascal

Using either Free Pascal 3.0 or Free Pascal 3.1.1 trunk, with either Lazarus 1.4.4, Lazarus 1.6RC2, or Lazarus Trunk, attempting to use this method always gives the error "Cannot assign a TAgg2DControl to a TAgg2DControl." I'm on Windows 10 64-Bit. The only way I've found around this so far is to add a new public property to TAggCustomAgg2DContol that gives direct access to the pixel map, i.e:

property PixelMap: TPixelMap read FPixelMap write FPixelMap;

I'm then able to use the the "PixelMap.Assign" function without any problems.

Just a question, not an issue

You stated in the README file

Initially I started the port only to see how it compares performance wise.

So what was the conclusion of that? Is using Class types faster than Object types?

I use the original AggPas code for some years, and have been wondering the same thing - if porting it to Class style objects would made any performance difference. Seems you might have found the results for me. 👍

How did you test the performance difference before and after?

Binaries

Looks like a useful app. Can someone release binaries?

Install and Info file have wrong names

Hi,
It seems my notificaation didn't make it to you^^". I changed the filenames. So the new correct names are Delphinus.Info.json and Delphinus.Install.json. I have updated the wiki accordingly.

Drawing with grain - is it possible?

I know this question will be a little bit absurd.

I would like to use AggPasMod for non-anti-aliased drawing just for performance reasons.

Would you recommend it? Is it even possible? To draw without anti-aliasing?

It would be necessary for programming a really fast RDP client with all its drawing primitives. It must run on really slow computers as well.

TAgg2D.Arc

Don't draw correct arc from any start angle except 0, and didn't felt a sign of sweep angle, also like a sweep value too.

when I install using delphinus,but error

Copying sourcefolders:
source
Compiling AggPasRun.dproj
Win32
Microsoft (R) 生成引擎版本 3.5.30729.5420
[Microsoft .NET Framework 版本 2.0.50727.5420]
版权所有(C) Microsoft Corporation 2007。保留所有权利。

Build started 2016-06-18 11:52:50.
Project "C:\Users\Public\Documents\Embarcadero\Studio\17.0\Comps\AggPasMod\source\Packages\RX\AggPasRun.dproj" on node 0 (Build target(s)).
正在创建目录“C:\Users\Public\Documents\Embarcadero\Studio\17.0\Comps\AggPasMod\bin\Win32\Release”。
正在创建目录“C:\Users\Public\Documents\Embarcadero\Studio\17.0\Comps\AggPasMod\lib\Win32\Release”。
BuildVersionResource:
CodeGear Resource Compiler/Binder
Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.

Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation. All rights reserved.

Deleting file "AggPasRun.vrc".
_PasCoreCompile:
Embarcadero Delphi for Win32 compiler version 30.0
Copyright (c) 1983,2015 Embarcadero Technologies, Inc.
AggPasRun.dpk(188): error F2613: Unit '....\Source\Agg2D.pas' not found.
Done Building Project "C:\Users\Public\Documents\Embarcadero\Studio\17.0\Comps\AggPasMod\source\Packages\RX\AggPasRun.dproj" (Build target(s)) -- FAILED.

Build FAILED.

"C:\Users\Public\Documents\Embarcadero\Studio\17.0\Comps\AggPasMod\source\Packages\RX\AggPasRun.dproj" (Build target) (1) ->
(_PasCoreCompile target) ->
AggPasRun.dpk(188): error F2613: Unit '....\Source\Agg2D.pas' not found.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:03.49

Error: Failed
Adding Libpathes:
Adding Searchpathes:
3rd Party\Expat
3rd Party\GPC
Controls
Platform
Svg
Adding Browsingpathes:
3rd Party\Expat
3rd Party\GPC
Controls
Platform
Svg
Error: Installation failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.