Lines Matching refs:idx
171 def __getitem__(self, idx):
179 if isinstance(idx, int):
180 assert idx >= Swizzle.SWIZZLE_X and idx <= Swizzle.SWIZZLE_NONE
181 if idx <= Swizzle.SWIZZLE_W:
182 return self.__list.__getitem__(idx)
184 return idx
185 elif isinstance(idx, str):
186 if idx in 'xyzw':
187 idx = 'xyzw'.find(idx)
188 elif idx in 'rgba':
189 idx = 'rgba'.find(idx)
190 elif idx in 'zs':
191 idx = 'zs'.find(idx)
194 return self.__list.__getitem__(idx)
297 for idx, channel in enumerate(self.channels):
299 channel.index = idx