⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zgv.1

📁 一个利用SDL语言来实现svgalib函数的示例程序
💻 1
📖 第 1 页 / 共 5 页
字号:
.RSEnable mouse support in zgv. \fI/dev/mouse\fR must be (usually asymlink to) the mouse device. The actual configuration of the mouseshould be done via svgalib's config file \fIlibvga.config\fR; see theman page for that for details..PP.RE`\fB--mouse-scale \fIscale\fR\fR'.RSSet the ratio of `mouse pixels' to onscreen pixels. The larger thenumber, the slower the mouse moves, and vice versa. (However, the numbermust be greater than zero.) If the mouse pointer moves at the wrongspeed for your tastes, play about with this setting and you should beable to fix it..PP.RE`\fB--pcd-res \fIresnum\fR\fR'.RSSelects the resolution used for Photo-CD files; 1=192x128, 2=384x256,3=768x512 (default), 4=1536x1024, 5=3072x2048. (This setting only has aneffect if Photo-CD support was enabled at compile-time.).PP.RE`\fB-g\fR'.RS.RE`\fB--pgm-truecol\fR'.RSThis one needs some background to fully explain --- greyscale files arenormally displayed in 8-bit modes, which due to VGA's limited palettemeans that only 64 greyscales can be shown (zgv normally fakes extraones, though; see \fBIncreased Greyscales\fR). But for people who workwith greyscale files and have 24/32-bit video modes available this canbe frustrating, as 24/32-bit modes display 256 greyscales. For thisreason, using the `\fB--pgm-truecol\fR' option enables a special-casehack to read (only) PGM files as if they were 24-bit. Using a 24/32-bitmode then gives you 256 greyscales. (Be careful to avoid 15/16-bit modesas these will only give 32! See \fBDrawbacks of 15/16-bit Modes\fR.).PP.RE`\fB-r \fIseconds\fR\fR'.RS.RE`\fB--reload-delay \fIseconds\fR\fR'.RSIf \fIseconds\fR is positive, then any picture displayed is re-readand redisplayed (without clearing the screen first) every\fIseconds\fR seconds. If it's `\fB0\fR' (zero), or negative, thepicture is only read once --- the default. Unless this option hassuddenly inspired you to write an interesting little shell script,you're unlikely ever to have a use for it. :-).PP.RE`\fB--reverse-bc-order\fR'.RSNormally, any brightness modification is applied after applying anycontrast. Enabling this reverses the order..PP.RE`\fB--revert-orient\fR'.RS(Normally enabled, use `\fB--revert-orient=off\fR' to disable.) Ifdisabled, orientation (flip/mirror/rotate) state is retained betweenpictures..PP.RE`\fB--revert-scale\fR'.RS(Normally enabled, use `\fB--revert-scale=off\fR' to disable.) Ifdisabled, scaling is retained between pictures..PP.RE`\fB--scrollbar\fR'.RS(Normally enabled, use `\fB--scrollbar=off\fR' to disable.) If disabled,don't show a scrollbar below the selector..PP.RE`\fB-s\fR'.RS.RE`\fB--show-dimensions\fR'.RSCause zgv to output the x and y offsets, and width and height of thesection of the image being displayed when you exit zgv. Can be usefulfor things like `\fBpnmcut `zgv -s input.ppm` input.ppm > output.ppm\fR'..PP.RE`\fB-T\fR'.RS.RE`\fB--show-tagged\fR'.RSPrint names of tagged files on exit. This can be useful in constructionssomething like `\fBmv `zgv -T` /tmp\fR', which moves to \fI/tmp\fR onlythe files you select..PP.RE`\fB--show-xvpics-dir\fR'.RSShow any \fI.xvpics\fR directories so that the thumbnails can be viewedeven if the files they referred to no longer exist. (However, it'susually easier to simply start zgv in the \fI.xvpics\fR dir.).PP.RE`\fB-S \fIdelay\fR\fR'.RS.RE`\fB--slideshow-delay \fIdelay\fR\fR'.RSSet time to wait in seconds before loading the next picture in aslideshow. The default is 4..PP.RE`\fB-l\fR'.RS.RE`\fB--slideshow-loop\fR'.RSLoop in slideshows `forever' (or rather, until you exit)..PP.RE`\fB-R\fR'.RS.RE`\fB--slideshow-randomise\fR'.RS.RE`\fB--slideshow-randomize\fR'.RSRandomise picture order in slideshows. Due to the shuffling approachtaken, there will be no repeats or omissions..PP.RE`\fB--viewer-16col-colour\fR'.RS.RE`\fB--viewer-16col-color\fR'.RSGive a dithered colour image in 640x480x4 mode when in the viewer(see \fBThe Viewer 640x480x4 Mode\fR), rather than greyscale..PP.RE`\fB-m \fImodespec\fR\fR'.RS.RE`\fB--viewer-start-mode \fImodespec\fR\fR'.RSSpecify the video mode zgv should start off using for the viewer. Thedefault is generally 640x480x8, but it's actually a bit more complicatedthan that (see \fBDefault Video Mode\fR). The `modespec' should be thewidth, height, and depth in quotes, e.g. `\fB"640 480 8"\fR'. See \fBVideoModes\fR, for details of precisely what this means..PP.RE`\fB--visual\fR'.RS(Normally enabled, use `\fB--visual=off\fR' to disable.) If disabled, nothumbnails are shown..PP.RE`\fB-k\fR'.RS.RE`\fB--vkludge\fR'.RSenables vkludge, which smoothes slightly when `zooming' a big picturedown to screen size, and also when in 320x400 and 360x480 modes..PP.RE`\fB--version\fR'.RSShow version number..PP.RE`\fB-w\fR'.RS.RE`\fB--write-ppm\fR'.RSWrite the file as a PPM to stdout rather than viewing it. (This onlyworks if you run zgv on a single file, specified on the command-line.)You're usually better off using a dedicated image-converting program,though..PP.RE`\fB--xzgv-keys\fR'.RSMakes zgv acts a bit more like xzgv, at least in terms of the keypressesit supports (see \fBxzgv Compatibility\fR)..PP.RE`\fB-z\fR'.RS.RE`\fB--zoom\fR'.RSEnable zoom mode, which resizes the picture to fit the screen.See \fBZoom Mode\fR..PP.RE`\fB--zoom-reduce-only\fR'.RSWhen in zoom mode, only \fIreduce\fR pictures to fit; i.e. make bigpictures viewable all-at-once while leaving small picures intact..RE.PPIf zgv is started with `\fBzgv \fIfile\fR\fR', zgv auto-loads the file(bypassing the file selector), and exits when you exit from viewing thepicture. (By the way, this also makes it possible to view single fileswithout the usual extensions such as \fI.gif\fR, etc. See \fBFile TypeIdentification\fR.).PPIf started with `\fBzgv \fIfile file2 ...\fR\fR' --- i.e. with more thanone filename --- zgv works in a similar way, except the multiple filesare shown as a slideshow, one after the other. You may want to specify`\fB-l\fR' so that zgv will loop around these pictures until `\fBEsc\fR' ispressed, and the `\fB-R\fR' option to shuffle (randomise) the pictureorder may also be of interest..PPIf started with `\fBzgv \fIstart-dir\fR\fR', zgv starts up with the usualfile selector, but with the current directory being the one specified..PPSettings which are either on or off (boolean) are, as you might expect,enabled by using e.g. `\fB-z\fR' or `\fB--zoom\fR'. However, there's analternative long-option form for setting these, resembling how they'reset in config files --- the syntax is `\fB--option=\fIstate\fR\fR', where\fIstate\fR is `\fBon\fR'/`\fBy\fR'/`\fByes\fR'/`\fB1\fR' to enable theoption, or `\fBoff\fR'/`\fBn\fR'/`\fBno\fR'/`\fB0\fR' to disable it. Themost useful thing about this is that it allows you to disable optionswhich were previously enabled, by using e.g. `\fB--zoom=off\fR'..PP(Readers used to the way GNU-style long options work should note that,since this `\fBon\fR'/`\fBoff\fR'/etc. arg is optional, you can't use the`\fB--option arg\fR' form in this case; it must be `\fB--option=arg\fR'for it to work.).PP.SH "ONLINE HELP"Online help (of a sort) is available in both the file selector andviewer:.PP`\fB?\fR'.RSGives online help. This lists some of the most commonly-used keypressesin the current context..RE.PPIn the viewer, you can also get a list of which key combinations selectwhich video modes. See \fBSelecting a Video Mode\fR..PP.SH "THE FILE SELECTOR"Usually, on starting up zgv, you will enter the file selector, whichlets you pick files to view (among other things). This lists thesubdirectories and picture files in the current directory, along withsmall `thumbnail' versions of the pictures if they exist..PP.SH "EXITING ZGV"Exiting zgv can be achieved two ways:.PP`\fBEsc\fR'.RS.RE`\fBx\fR'.RSQuit zgv normally..PP.RE`\fB^C\fR'.RSQuit zgv in a rather immediate and nasty way, by sending \fISIGINT\fR.(This is actually dealt with by svgalib.) You should only use ^C to quitif zgv appears to lock up or takes an unbearably long time to dosomething..PP(Technically it may not be `\fB^C\fR' which sends \fISIGINT\fR, but youwould have to have a strange setup for this to be the case.).RE.PP.SH "THUMBNAILS"(This section is deliberately early on in the manual, as thumbnails areprobably the most important feature of the file selector, so it's bestthat you know how to create/update them sooner rather than later.).PPThumbnails are small versions of the pictures they represent, and aredisplayed by the file selector if they exist. zgv uses xv-compatiblethumbnails --- if you create thumbnails with xv they will work with zgv,and vice versa. zgv's thumbnails are also compatible with the Gimp, andxzgv..PPIf no thumbnail exists for a file or directory, a small `document' or`folder' graphic appears instead..PP.SS "Updating Thumbnails"While thumbnails can be made relatively quickly, it's by no means aninstant process. For this reason, thumbnails have to be created inadvance, and are stored as files in their own right in (usually) asubdirectory \fI.xvpics\fR..PPzgv never creates/updates thumbnails without you telling it to. So, ifyou enter a directory where the picture files don't have any thumbnails,or where the thumbnails seem to be out of date, you should press`\fBu\fR'..PPAlternatively, you can create/update thumbnails for the currentdirectory and all subdirectories by using `\fBAlt-u\fR'. But be warnedthat a recursive update can take some time!.PP`\fBu\fR'.RSCreate thumbnails for any files which don't have them, and updatethumbnails which are older than than the corresponding file. While thisis going on, the text \fIupdating index of\fR prefixes the usualdisplay of the current directory's name..PPYou can press `\fBEsc\fR' while the update is in progress to abort it; zgvwill stop once it has finished the thumbnail it is currently working on(if any)..PPIf you switch consoles while the update is in progress, it will continueto run `in the background'. When you switch back, if the update is stillin progress, it may look as though zgv is doing nothing (or the screenmay look a bit confusing) for some time. The reason is that the screenis not updated unless zgv is running on the currently displayed console(this is unfortunately necessary). The screen is redrawn when thecurrent thumbnail has been dealt with..PP.RE`\fBAlt-u\fR'.RSCreate/update thumbnails for all files in the current directory and allsubdirectories --- in other words, do a recursive update. This can takesome time, so you are prompted to confirm that you really want to dothis (see \fBDialog Boxes\fR). As above, it will continue running `in thebackground' if you switch consoles, and you can press `\fBEsc\fR' toabort..PP.RE`\fBd\fR'.RSCreate thumbnails for subdirectories. Don't confuse this with therecursive update; this generates thumbnails for the directories\fIthemselves\fR, not the files within them. (Most people probablywon't want to bother with these, as they're not as helpful as you mightthink.) These consist of the first four files in the subdir, squeezedtogether into a single thumbnail. There is (currently) no `update'mechanism for subdir thumbnails --- all of them are newly created eachtime you press `\fBd\fR'..RE.PP.SS "Thumbnail Storage"Normally, thumbnails are stored in the subdirectory \fI.xvpics\fR(creating the dir first if needed), with the same name as the filenamethey represent. However, there are times when using \fI.xvpics\fR isn'tpossible --- for example, the filesystem may be read-only (such as on aCD), or may not support the \fI.xvpics\fR name (such as on an\fImsdos\fR filesystem), or you may not have permission to write to thedirectory..PPIn these situations, zgv stores the thumbnails elsewhere. They go indirectories under the \fI.xvpics\fR dir in your home directory. Thename for the directory they go in there is the directory name they werefound in, but with slashes (`\fB/\fR') converted to underscores(`\fB_\fR')..PPAn example should make things clearer. Say zgv needs to create athumbnail for \fIwibble.jpg\fR, in the directory \fI/foo/bar/baz\fR,but can't use \fI.xvpics\fR. It will put the thumbnail in\fI$HOME/.xvpics/_foo_bar_baz/wibble.jpg\fR, creating directories asnecessary..PPWhere a thumbnail is stored makes virtually no difference to how zgvworks; the main difference is that the latter, more indirect way ofstoring thumbnails means that thumbnails will take slighter longer todisplay..PP.SS "Thumbnail Issues"The thumbnails used in zgv require 256 colours to display.Unfortunately, the rest of zgv's file selector needs an additional fivecolours. Normally this is dealt with by finding the `closest' thumbnailcolours, and (this is the important part) changing them to the fileselector colours. The disturbance to the thumbnails should be barelynoticeable..PP(All the same, you can disable this using the config file setting\fIfs-perfect-cols\fR (see \fBConfiguring zgv\fR). But bear in mindthat the selector will then look rather strange!).PPIn 16-colour mode (see \fB16-colour File Selector\fR), the way it worksmeans fewer colours are needed, and the file selector's five colours canbe (and are) separate from the thumbnail colours..PP.SH "SCREEN LAYOUT"The file selector is simply a list of subdirectories and filenames,along with any thumbnails that exist for them. The list is inasciibetical order (but you can change this; see \fBChanging the SortingOrder\fR). Names of directories are shown (like this), and they are shownin order at the beginning of the list, before all the picture files.Long filenames are truncated to fit; three dots indicate where this hashappened. (See \fBOther File Sel Commands\fR, for how to display the fullfilename.).PPThe list is often larger than can fit on the screen at once. If this isthe case, only part is shown at a time, but you can move around the listwith the cursor keys and the like..PPThe colours used for the file selector can be changed, if you dislikethe defaults (see \fBConfiguring zgv\fR)..PP.SH "MOVING AROUND THE LIST"The cursor in zgv is (normally) shown as a `raised' entry in the list.The cursor has two main functions:.PP\fB-\fR It selects a file for `view', `tag' etc. commands to operate on..PP\fB-\fR It determines which part of the list is shown, as the part of the listshown onscreen always contains the cursor.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -