File: ada_bar_codes.txt

package info (click to toggle)
ada-bar-codes 005-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 364 kB
  • sloc: ada: 2,245; makefile: 28; sh: 6
file content (88 lines) | stat: -rw-r--r-- 2,704 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Intro to Ada Bar Codes
======================

The project Ada Bar Codes provides a package for generating
various types of bar codes, including 2D bar codes like the QR code,
on different output formats, such as PDF, SVG or bitmaps.

The creation of a bar code is as simple as this small procedure:

    with Ada.Text_IO, Bar_Codes, Bar_Codes_Media;

    procedure Small_Demo is
      use Ada.Text_IO;
      svg : File_Type;
    begin
      Create (svg, Out_File, "qr_code.svg");
      Put_Line
        (svg,
         Bar_Codes_Media.SVG_Bar_Code
           (Bar_Codes.Code_QR_Low, 100.0, 100.0, "mm", "Hello"));
      Close (svg);
    end Small_Demo;

Contents
========

  Ada Bar Codes
  =============

  - ada_bar_codes.gpr       : project file for the AdaCore GNAT compiler
  - ada_bar_codes.prj       : project file for the PTC ObjectAda compiler
  - ada_bar_codes.txt       : this file
  - bar_codes.ads           : Bar_Codes package specification
  - bar_codes.adb           : Bar_Codes package body
  - bar_codes-encode*       : separate sub-packages of Bar_Codes
  - bar_codes_media.ad*     : a few simple implementations examples for
                                the SVG, PDF, PBM and PNG formats
  - demo/bar_codes_demo.adb : demo procedure
  - test/bar_codes_test.adb : test procedure (produces lots of files!)

Warning & legal
===============
There is NO WARRANTY in this software. Read copyright notice in bar_codes.ads.

Portability
===========
This software can be compiled for any target machine, and with any compiler
for Ada 2012 or later language versions.

How to build Ada Bar Codes and its demo
=======================================
Here is how to build with GNAT/GCC:

    - type "gprbuild -P ada_bar_codes" in the command line
or
    - type "gnatmake -P ada_bar_codes" in the command line
or
    - open the ada_bar_codes.gpr file (will launch GNAT Studio),
      press F4 (Build)

Here is how to build with ObjectAda (tested with v.9.2):
    - open the ada_bar_codes_oa.prj file, press F7 (Build)

The project builds bar_codes_demo[.exe] and bar_codes_test[.exe].

Thanks to...
============

Giuseppe Cannone, for the inspiration and advice.

Jeffrey R. Carter, for the first implementation on raster graphics
  and as a Web service: https://github.com/jrcarter/Gnoga_Bar_Codes

Nicolas Boulenguez <nicolas@debian.org>,
  for numerous suggestions and improvements.

On the Web
==========
Home page:     http://ada-bar-codes.sf.net/
Project page:  http://sf.net/projects/ada-bar-codes/
Mirror:        https://github.com/zertovitch/ada-bar-codes
Alire crate:   https://alire.ada.dev/crates/bar_codes

--
Enjoy!

Gautier de Montmollin
gautier.de.montmollin, at: gmail dot com.