Alien-FLTK
view release on metacpan or search on metacpan
Selected Upstream Changes:
* [r7704] Fixed Windows class name (xclass) setup and caching mechanism.
This was not yet completely converted to UTF-8. Cleaned up related
code, removed old comments.
Tested and confirmed that the xclass() setup works and that different
icons can be set for different window classes (as it was in FLTK
1.1.10).
* [r7697] Full support of UTF-8 text for PostScript printing/output in 2
ways:
- Latin characters (unicode <= 17F) and a few other symbols, among
which the ?\226?\130?\172 (Euro), are output using vectorial fonts
- All other characters are output as a bitmap copy of their
offscreen rendition.
* [r7696] Simpler PostScript output of Fl_Bitmap objects
* [r7695] PostScript output of Fl_Pixmap objects: accept now arbitrarily
large pixmaps
Version 0.07694001 | 2010-09-04 03:56:05Z (Sat, 04 Sep 2010) | 45bb2d7
Notes:
* Builds against r7694 of the 1.3.x branch of fltk
my $CC = ExtUtils::CBuilder->new();
my $SRC = 'hello_world.cxx';
open(my $FH, '>', $SRC) || die '...';
syswrite($FH, <<'') || die '...'; close $FH;
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(FL_UP_BOX, 20, 40, 260, 100, "Hello, World!");
box->labelfont(FL_BOLD + FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}
my $OBJ = $CC->compile('C++' => 1,
source => $SRC,
include_dirs => [$AF->include_dirs()],
examples/opengl.pl view on Meta::CPAN
glColor3f(0.0, 1.0, 0.0); glBegin(GL_POLYGON); glVertex3f(TOP); glVertex3f(BACK); glVertex3f(RIGHT); glEnd();
glColor3f(0.0, 0.0, 1.0); glBegin(GL_POLYGON); glVertex3f(TOP); glVertex3f(LEFT); glVertex3f(BACK); glEnd();
glColor3f(0.5, 0.5, 0.5); glBegin(GL_POLYGON); glVertex3f(RIGHT); glVertex3f(BACK); glVertex3f(LEFT); glEnd();
// Print tetrahedron's points on object
// Disable depth buffer while drawing text,
// so text draws /over/ object.
//
glDisable(GL_DEPTH_TEST);
{
const char *p;
gl_font(1, 12);
glColor3f(1.0, 1.0, 1.0);
glRasterPos3f(TOP); p = "+ top"; gl_draw(p, strlen(p));
glRasterPos3f(LEFT); p = "+ left"; gl_draw(p, strlen(p));
glRasterPos3f(RIGHT); p = "+ right"; gl_draw(p, strlen(p));
glRasterPos3f(BACK); p = "+ back"; gl_draw(p, strlen(p));
}
glEnable(GL_DEPTH_TEST);
// Print rotangle value at fixed position at lower left
char s[40];
sprintf(s, "ROT=%.2f", rotangle);
examples/synopsis.pl view on Meta::CPAN
my $CC = ExtUtils::CBuilder->new();
my $SRC = 'hello_world.cxx';
open(my $FH, '>', $SRC) || die '...';
syswrite($FH, <<'END') || die '...'; close $FH;
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(FL_UP_BOX, 20, 40, 260, 100, "Hello, World!");
box->labelfont(FL_BOLD + FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}
END
my $OBJ = $CC->compile('C++' => 1,
source => $SRC,
include_dirs => [$AF->include_dirs()],
lib/Alien/FLTK.pm view on Meta::CPAN
my $CC = ExtUtils::CBuilder->new();
my $SRC = 'hello_world.cxx';
open(my $FH, '>', $SRC) || die '...';
syswrite($FH, <<'') || die '...'; close $FH;
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(FL_UP_BOX, 20, 40, 260, 100, "Hello, World!");
box->labelfont(FL_BOLD + FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}
my $OBJ = $CC->compile('C++' => 1,
source => $SRC,
include_dirs => [$AF->include_dirs()],
t/0002_exe.t view on Meta::CPAN
);
syswrite($FH, <<'END') || BAIL_OUT("Failed to write to $SRC: $!"); close $FH;
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(20, 40, 300, 100, "Hello, World!");
box->box(FL_UP_BOX);
box->labelfont(FL_BOLD + FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end(); /* Showing the window causes the test to fail on
window->show(argc, argv); X11 w/o a display. Testing the creation of the
wait(0.1); window and a widget should be enough.
window->hide(); */
return 0;
}
END
my $OBJ = $CC->compile(
( run in 0.580 second using v1.01-cache-2.11-cpan-5735350b133 )