Sponsored Content
Full Discussion: Tutorial forum?
Contact Us Post Here to Contact Site Administrators and Moderators Tutorial forum? Post 64013 by Neo on Friday 25th of February 2005 11:13:09 PM
Old 02-26-2005
The mods are discussing your requests. Sorry, we have been a bit busy with Gollum lately.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tk tutorial

Anyone know any good website with a step by step instructions on writing Perl GUI scripts with Tk ??? (3 Replies)
Discussion started by: perleo
3 Replies

2. AIX

AIX useful tutorial...

hi guys, I want to learn AIX, I am a beginner for this operating system of IBM. Can anyone give me some useful tutorial for a beginner like me?... Thanks... + GOD bless + ^_^ (1 Reply)
Discussion started by: TechReader
1 Replies

3. Shell Programming and Scripting

Why do I need this in the script tutorial?

I'm taking a tutorial - intro to Unix Shell Scripting - and the first exercise is a walk-through of writing a script to achieve the following: "As a network administrator you are collecting configuration information about all FTP servers in the organisation. You need to write a script to collect... (6 Replies)
Discussion started by: MaindotC
6 Replies

4. How to Post in the The UNIX and Linux Forums

Forum Video Tutorial: How to Use Code Tags

How to Use Code Tags in The UNIX and Linux Forums Developer: This video tutorial was created by scott for forum users. Everyone should use code tags when posting code and command line logic in the forums. cPF45jjWe7Q A full list of BB codes is available here. (8 Replies)
Discussion started by: Neo
8 Replies

5. What is on Your Mind?

Forum Update: Disabled Home Page Forum Statistics for Guests (Not Registered)

Just a quick update; to speed up the forums, I have disabled the forum statistics on the home page for non registered users. No changes for registered users. (0 Replies)
Discussion started by: Neo
0 Replies

6. Web Development

Vue JS 2 Tutorial by The Net Ninja: A Recommended Vue.js Video Tutorial Series

A number of people have asked me how to get started with Vue.js and my reply before today was to Google "Vue.js". That has changed and my recommendation to anyone who wants to learn the fastest growing, easiest to learn and use Vue.js web dev framework is to watch this video tutorial series: ... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

Mobile: Advanced Forum Statistics to Forum Home Page

For mobile users, I have just added a "first beta" Advanced Forum Statistics to the home page on mobile using CSS overflow:auto; so you can swipe if you need to see more. Google Search Console mobile usability says this page is "mobile friendly" so perhaps this will be useful for some of our... (12 Replies)
Discussion started by: Neo
12 Replies
asflip(3x)						   AfterStep X11 window manager 						asflip(3x)

NAME
asflip - demonstrates flipping image in 90 degree increments libAfterImage/tutorials/ASFlip NAMEASFlip SYNOPSIS
libAfterImage application for image rotation. DESCRIPTION
New steps described in this tutorial are : ASFlip.1. Flip value. ASFlip.2. Rotating ASImage. SEE ALSO
Tutorial 1: ASView - explanation of basic steps needed to use libAfterImage and some other simple things. Tutorial 2: ASScale - image scaling basics. Tutorial 3: ASTile - image tiling and tinting. Tutorial 4: ASMerge - scaling and blending of arbitrary number of images. Tutorial 5: ASGrad - drawing multipoint linear gradients. SOURCE
#include "../afterbase.h" #include "../afterimage.h" #include "common.h" void usage() { printf( "Usage: asflip [-h]|[[-f flip]|[-m vertical] " "[-g geom] image]"); printf( " Where: image - is image filename "); printf( " flip - rotation angle in degrees. " "90, 180 and 270 degrees supported "); printf( " geom - source image is tiled using this geometry, " "prior to rotation "); printf( " vertical - 1 - mirror image in vertical direction, " "0 - horizontal "); } int main(int argc, char* argv[]) { Display *dpy = NULL; ASVisual *asv ; int screen = 0 , depth = 0 ; char *image_file = "rose512.jpg" ; int flip = FLIP_VERTICAL; Bool vertical = False, mirror = False ; int tile_x, tile_y, geom_flags = 0; unsigned int tile_width, tile_height ; ASImage *im = NULL; ASImage *flipped_im = NULL ; /* see ASView.1 : */ set_application_name( argv[0] ); if( argc > 1 ) { int i = 1 ; if( strcmp( argv[1], "-h" ) == 0 ) { usage(); return 0; } for( i = 1 ; i < argc ; i++ ) { if( argv[i][0] == '-' && i < argc-1 ) { switch(argv[i][1]) { case 'm' : mirror = True; vertical = atoi(argv[i+1]) ; break ; case 'f' : /* see ASFlip.1 */ mirror = False; flip = atoi(argv[i+1])/90 ; break ; case 'g' : /* see ASTile.2 : */ geom_flags = XParseGeometry( argv[i+1], &tile_x, &tile_y, &tile_width, &tile_height ); break ; } ++i ; }else image_file = argv[i] ; } }else usage(); #ifndef X_DISPLAY_MISSING dpy = XOpenDisplay(NULL); _XA_WM_DELETE_WINDOW = XInternAtom( dpy, "WM_DELETE_WINDOW", False); screen = DefaultScreen(dpy); depth = DefaultDepth( dpy, screen ); #endif /* see ASView.2 : */ im = file2ASImage( image_file, 0xFFFFFFFF, SCREEN_GAMMA, 0, getenv("IMAGE_PATH"), NULL ); if( im == NULL ) return 1; /* Making sure tiling geometry is sane : */ if( !get_flags(geom_flags, XValue ) ) tile_x = 0 ; if( !get_flags(geom_flags, YValue ) ) tile_y = 0 ; if( !get_flags(geom_flags, WidthValue ) ) { if( !mirror ) tile_width = (get_flags(flip,FLIP_VERTICAL))? im->height:im->width ; else tile_width = im->width ; } if( !get_flags(geom_flags, HeightValue ) ) { if( !mirror ) tile_height = (get_flags(flip,FLIP_VERTICAL))? im->width:im->height; else tile_height = im->height ; } printf( "%s: tiling image "%s" to %dx%d%+d%+d and then " "flipping it by %d degrees ", get_application_name(), image_file, tile_width, tile_height,tile_x, tile_y, flip*90 ); /* see ASView.3 : */ asv = create_asvisual( dpy, screen, depth, NULL ); /* see ASFlip.2 : */ if( !mirror ) flipped_im = flip_asimage( asv, im, tile_x, tile_y, tile_width, tile_height, flip, ASA_ASImage, 0, ASIMAGE_QUALITY_DEFAULT ); else flipped_im = mirror_asimage(asv, im, tile_x, tile_y, tile_width, tile_height, vertical, ASA_ASImage, 0, ASIMAGE_QUALITY_DEFAULT ); destroy_asimage( &im ); if( flipped_im ) { #ifndef X_DISPLAY_MISSING /* see ASView.4 : */ Window w = create_top_level_window( asv, DefaultRootWindow(dpy), 32, 32, tile_width, tile_height, 1, 0, NULL, "ASFlip", image_file ); if( w != None ) { Pixmap p ; XMapRaised (dpy, w); /* see ASView.5 : */ p = asimage2pixmap( asv, DefaultRootWindow(dpy), flipped_im, NULL, True ); destroy_asimage( &flipped_im ); /* see common.c: set_window_background_and_free() : */ p = set_window_background_and_free( w, p ); /* see common.c: wait_closedown() : */ } wait_closedown(w); dpy = NULL; #else /* writing result into the file */ ASImage2file( flipped_im, NULL, "asflip.jpg", ASIT_Jpeg, NULL ); destroy_asimage( &flipped_im ); #endif } return 0 ; } libAfterImage/tutorials/ASFlip.1 [6.1] SYNOPSIS
Step 1. Flip value. DESCRIPTION
libAfterImage provides facility for rotating images in 90 degree increments - flipping essentially. Accordingly flip parameter could have 4 values - 0, -90, -180, -270 degrees. EXAMPLE
flip = atoi(argv[2])/90; SEE ALSO
flip libAfterImage/tutorials/ASFlip.2 [6.2] SYNOPSIS
Step 2. Flipping ASImage. DESCRIPTION
Flipping can actually be combined with offset and tiling. Original image gets tiled to supplied rectangle, and then gets rotated to requested degree. EXAMPLE
flipped_im = flip_asimage(asv, im, tile_x, tile_y, tile_width, tile_height, flip, ASA_XImage,0, ASIMAGE_QUALITY_DEFAULT ); destroy_asimage( &im ); NOTES
As far as we need to render rotated image right away - we set to_xim parameter to True, so that image will be rotated into XImage. Right after rotation is done - we can destroy original image. SEE ALSO
flip_asimage() 3rd Berkeley Distribution AfterStep v.2.2.11 asflip(3x)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy