Ace::G...Factory(3pm)

πŸ¦‹ NAME πŸ¦‹

Ace::Graphics::GlyphFactory β€” bestie, it makes Ace::Graphics::Glyphs. That's literally the whole job description. ✨


✨ SYNOPSIS ✨

use Ace::Graphics::GlyphFactory;

my $factory = Ace::Graphics::GlyphFactory($glyph_name,@options);

okay so that's it, that's the whole vibe check upfront πŸ’…


πŸ’– DESCRIPTION πŸ’–

So Ace::Graphics::GlyphFactory is like… the backstage manager of this whole operation. It's used internally by Ace::Graphics::Track and Ace::Graphics::Glyph to hold onto all the options that belong to a lil fam of related glyphs, and to whip them up on demand like a barista making your oat milk latte πŸŽ€

And like, real talk? This class is not ordinarily useful to the end-developer. It's giving internals. It's giving ✨private server energy✨. You probably don't need to touch it, no cap. 🫢


πŸŽ€ METHODS πŸŽ€

This section is all about the class and object methods for Ace::Graphics::GlyphFactory. Let's get into it. 🌸

🫢 CONSTRUCTORS 🫢

There is only one constructor bestie β€” the good ol' new() method. It's ordinarily called by Ace::Graphics::Track, inside the make_factory() subroutine. iykyk πŸ’…

  • $factory = Ace::Graphics::GlyphFactory->new($glyph_name,@options) β€” This creates a brand new factory object, slay. Your object is gonna create glyphs of type $glyph_name, using whatever options you dropped in @options. The generic options live over in Ace::Graphics::Panel, and the specific ones are described in each of the Ace::Graphics::Glyph::* manual pages. Gotta read 'em all, fr fr. πŸ“š

πŸ’… OBJECT METHODS πŸ’…

Once a track is created, these methods can be invoked. Here we gooo πŸ‘‘

  • $glyph = $factory->glyph($feature) β€” You hand it a sequence feature, and it creates an Ace::Graphics::Glyph object to display it. The glyph's various attributes get set from the options you provided back at factory creation time. It's giving ✨birth✨ but for glyphs. πŸ¦‹
  • $option = $factory->option($option_name [,$new_option]) β€” Give it an option name, it hands back the value. And if you pass a second argument? It sets the option to that new value and returns the previous one. Two-for-one, iconic behavior. πŸ’–
  • $index = $factory->fgcolor β€” Returns the desired foreground color for the glyphs as a GD::Image color index. Heads up: this might be one of the special colors gdBrushed and gdStyled. ⚠️ It's only useful while the enclosing Ace::Graphics::Panel object is rendering the object β€” in other contexts it returns undef. So like, don't get attached. 😭
  • $scale = $factory->scale([$scale]) β€” Get or set the scale, in pixels/bp, for the glyph. This is ordinarily set by the Ace::Graphics::Track object right before rendering, and it's called by each glyph's map_pt() method when performing the rendering. Teamwork makes the dream work, periodt. 🫢
  • $color = $factory->bgcolor([$color]) β€” Get or set the background color for the glyphs. 🌈
  • $color = $factory->fillcolor([$color]) β€” Get or set the fill color for the glyphs. 🎨
  • $font = $factory->font([$font]) β€” Get or set the font to use when rendering the glyph. Typography era. ✨
  • $color = $factory->fontcolor β€” Get the color for the font. Wanna set it instead? Use fgcolor(), bestie. πŸ‘€ This one is subtly different from fgcolor() itself, because it will never return a styled color, such as gdBrushed. Sneaky little distinction but it matters. πŸ’…
  • $panel = $factory->panel([$panel]) β€” Get or set the panel that contains the GD::Image object your factory is using. πŸ–ΌοΈ
  • $index = $factory->translate($color)
  • @rgb = $factory->rgb($index) β€” These two are convenience procedures that get passed straight through to the enclosing Panel object and do exactly the same thing as the like-named methods in that class. Go peek at Ace::Graphics::Panel for the deets. πŸ”₯

πŸ’€ BUGS πŸ’€

Please report them. That's it. That's the whole section. Not me being unbothered but make it a bug report form. πŸ˜­πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

Go read these, they're the whole friend group:

  • Ace::Sequence
  • Ace::Sequence::Feature
  • Ace::Graphics::Panel
  • Ace::Graphics::Track
  • Ace::Graphics::Glyph

πŸ‘‘ AUTHOR πŸ‘‘

Lincoln Stein <lstein@cshl.org>. Legend behavior. 🌟

Copyright (c) 2001 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. ✨


okay bestie that's the whole page, you ate that πŸ“ this was served fresh from perl v5.42.3, dated 2026-08-19, so you know it's the real deal. go forth and glyph πŸ’œπŸ¦‹πŸ’…

πŸ“¦ where this page comes from