| 1 | package X11::XRandR::Transform; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: A transform | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Types::Common::Numeric qw[ PositiveOrZeroInt ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Types::Standard qw[ Undef ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use X11::XRandR::Types -types; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use MooX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 1 | our $VERSION = '0.01'; | |||||||||
| 14 | |||||||||||
| 15 | #pod =attr filter | ||||||||||
| 16 | #pod | ||||||||||
| 17 | #pod See L<X11::XRandR::Types/Filter> for values. Optional | ||||||||||
| 18 | #pod | ||||||||||
| 19 | #pod =method has_filter | ||||||||||
| 20 | #pod | ||||||||||
| 21 | #pod I<Boolean> True if L<filter> was specified. | ||||||||||
| 22 | #pod | ||||||||||
| 23 | #pod =cut | ||||||||||
| 24 | |||||||||||
| 25 | 1 | has filter => ( | |||||||||
| 26 | is => 'ro', | ||||||||||
| 27 | isa => Filter | Undef, | ||||||||||
| 28 | predicate => 1, | ||||||||||
| 29 | clearer => 1, | ||||||||||
| 30 | ); | ||||||||||
| 31 | |||||||||||
| 32 | #pod =attr matrix | ||||||||||
| 33 | #pod | ||||||||||
| 34 | #pod A transformation matrix. See L<X11::XRandR::Types/XTransform>. | ||||||||||
| 35 | #pod | ||||||||||
| 36 | #pod =cut | ||||||||||
| 37 | |||||||||||
| 38 | has matrix => ( | ||||||||||
| 39 | is => 'ro', | ||||||||||
| 40 | isa => XTransform, | ||||||||||
| 41 | 0 | ▶ | default => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 42 | 0 | [ [ 1, 0, 0 ], | |||||||||
| 43 | [ 0, 1, 0 ], | ||||||||||
| 44 | [ 0, 0, 1 ], | ||||||||||
| 45 | ]; | ||||||||||
| 46 | }, | ||||||||||
| 47 | 1 | ); | |||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | #pod =for Pod::Coverage BUILD | ||||||||||
| 51 | #pod | ||||||||||
| 52 | #pod =cut | ||||||||||
| 53 | |||||||||||
| 54 | 0 | ▶ | sub BUILD { | ||||||||
|
Subroutine
BUILD: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 55 | |||||||||||
| 56 | 0 | my $self = shift; | |||||||||
| 57 | 0 | ▶ | $self->clear_filter if !defined $self->filter; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | #pod =method to_string | ||||||||||
| 61 | #pod | ||||||||||
| 62 | #pod Return a string rendition of the object just as B<xrandr> would. | ||||||||||
| 63 | #pod | ||||||||||
| 64 | #pod =cut | ||||||||||
| 65 | |||||||||||
| 66 | 0 | ▶ | sub to_string { | ||||||||
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 67 | 0 | sprintf( "%d/%d/%d/%d", | |||||||||
| 68 | $_[0]->left, $_[0]->top, $_[0]->right, $_[1]->bottom ); | ||||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | 1 | 1; | |||||||||
| 72 | |||||||||||
| 73 | # | ||||||||||
| 74 | # This file is part of X11-XRandR | ||||||||||
| 75 | # | ||||||||||
| 76 | # This software is Copyright (c) 2018 by Diab Jerius. | ||||||||||
| 77 | # | ||||||||||
| 78 | # This is free software, licensed under: | ||||||||||
| 79 | # | ||||||||||
| 80 | # The GNU General Public License, Version 3, June 2007 | ||||||||||
| 81 | # | ||||||||||
| 82 | |||||||||||
| 83 | __END__ | ||||||||||