Android

Android


10.IMÁGENES

Página 112 de 286

a

l

q

u

i

e

r

c

a

s

o

,

n

u

e

s

t

r

a

i

m

a

g

e

n

s

i

e

m

p

r

e

p

o

d

r

á

r

e

e

s

c

a

l

a

r

s

e

p

a

r

a

a

j

u

s

t

a

r

s

e

l

o

m

á

s

p

o

s

i

b

l

e

a

l

a

p

a

n

t

a

l

l

a

.

E

n

e

l

s

i

g

u

i

e

n

t

e

e

j

e

m

p

l

o

m

o

s

t

r

a

m

o

s

u

n

a

f

o

r

m

a

d

e

h

a

c

e

r

l

o

.

M

o

d

i

f

i

c

a

m

o

s

l

a

c

l

a

s

e

P

i

n

t

u

r

a

d

e

l

e

j

e

m

p

l

o

a

n

t

e

r

i

o

r

p

a

r

a

l

e

e

r

u

n

a

i

m

a

g

e

n

q

u

e

e

s

m

a

y

o

r

q

u

e

l

a

r

e

s

o

l

u

c

i

ó

n

d

e

l

a

p

a

n

t

a

l

l

a

.

L

a

i

m

a

g

e

n

s

e

r

e

e

s

c

a

l

a

d

e

p

e

n

d

i

e

n

d

o

d

e

l

a

r

a

z

ó

n

a

l

t

u

r

a

/

a

n

c

h

u

r

a

d

e

l

a

i

m

a

g

e

n

,

c

o

m

p

a

r

a

d

a

c

o

n

l

a

r

e

l

a

c

i

ó

n

a

n

c

h

u

r

a

/

a

l

t

u

r

a

d

e

l

a

p

a

n

t

a

l

l

a

.

S

i

l

a

p

r

i

m

e

r

a

r

a

z

ó

n

e

s

m

e

n

o

r

q

u

e

l

a

s

e

g

u

n

d

a

,

s

e

a

j

u

s

t

a

e

l

a

n

c

h

o

d

e

l

a

i

m

a

g

e

n

a

l

d

e

l

a

p

a

n

t

a

l

l

a

y

,

e

n

c

a

s

o

c

o

n

t

r

a

r

i

o

,

s

e

a

j

u

s

t

a

l

a

a

l

t

u

r

a

d

e

l

a

i

m

a

g

e

n

a

l

a

a

l

t

u

r

a

d

e

l

a

p

a

n

t

a

l

l

a

.

p

u

b

l

i

c

c

l

a

s

s

P

i

n

t

u

r

a

e

x

t

e

n

d

s

V

i

e

w

{

 

 

 

i

n

t

i

n

d

i

c

e

I

m

a

g

e

n

=

R

.

d

r

a

w

a

b

l

e

.

j

e

r

r

y

_

g

a

r

c

i

a

1

0

0

0

;

 

 

 

D

r

a

w

a

b

l

e

i

m

a

g

e

n

=

g

e

t

R

e

s

o

u

r

c

e

s

(

)

.

g

e

t

D

r

a

w

a

b

l

e

(

i

n

d

i

c

e

I

m

a

g

e

n

)

;

 

 

 

p

u

b

l

i

c

P

i

n

t

u

r

a

(

C

o

n

t

e

x

t

c

o

n

t

e

x

t

)

{

 

 

 

 

 

 

 

s

u

p

e

r

(

c

o

n

t

e

x

t

)

;

 

 

 

}

 

 

 

@

O

v

e

r

r

i

d

e

 

 

 

p

u

b

l

i

c

v

o

i

d

o

n

D

r

a

w

(

C

a

n

v

a

s

c

a

n

v

a

s

)

{

 

 

 

 

 

P

a

i

n

t

p

=

n

e

w

P

a

i

n

t

(

)

;

 

 

 

 

 

p

.

s

e

t

C

o

l

o

r

(

C

o

l

o

r

.

W

H

I

T

E

)

;

 

 

 

 

 

c

a

n

v

a

s

.

d

r

a

w

P

a

i

n

t

(

p

)

;

 

 

 

 

 

i

n

t

b

o

t

t

o

m

=

g

e

t

B

o

t

t

o

m

(

)

;

 

 

 

 

 

i

n

t

r

i

g

h

t

=

g

e

t

R

i

g

h

t

(

)

;

 

 

 

 

 

f

l

o

a

t

r

a

t

i

o

S

c

r

e

e

n

=

(

f

l

o

a

t

)

b

o

t

t

o

m

/

r

i

g

h

t

;

 

 

 

 

 

i

n

t

a

n

c

h

u

r

a

I

m

=

i

m

a

g

e

n

.

g

e

t

I

n

t

r

i

n

s

i

c

W

i

d

t

h

(

)

;

 

 

 

 

 

i

n

t

a

l

t

u

r

a

I

m

=

i

m

a

g

e

n

.

g

e

t

I

n

t

r

i

n

s

i

c

H

e

i

g

h

t

(

)

;

 

 

 

 

 

f

l

o

a

t

r

a

t

i

o

=

(

f

l

o

a

t

)

a

l

t

u

r

a

I

m

/

a

n

c

h

u

r

a

I

m

;

 

 

 

 

 

i

n

t

a

n

c

h

u

r

a

,

a

Ir a la siguiente página

Report Page